Frank Zago to sdl

The following patch fixes some of the bitrot for the Nintendo DS port.
The support is still basic at the moment, but it allows to run the "general"
test under the current head of tree (parent: 5269:11bd1585efb5 tip).
Most of the patch is mine, but I integrated a couple changes that John
Magnotti posted on Feb 1st.
This commit is contained in:
Sam Lantinga 2011-02-12 11:36:56 -08:00
parent 5fc9a80e24
commit 96656bb924
15 changed files with 603 additions and 82 deletions

View file

@ -57,11 +57,13 @@ NDSAUD_OpenDevice(_THIS, const char *devname, int iscapture)
}
}
#if 0
/* set the generic sound parameters */
setGenericSound(22050, /* sample rate */
127, /* volume */
64, /* panning/balance */
0); /* sound format */
#endif
return 1;
}
@ -69,13 +71,9 @@ NDSAUD_OpenDevice(_THIS, const char *devname, int iscapture)
static void
NDSAUD_PlayDevice(_THIS)
{
TransferSoundData *sound = SDL_malloc(sizeof(TransferSoundData));
if (!sound) {
SDL_OutOfMemory();
}
playGenericSound(this->hidden->mixbuf, this->hidden->mixlen);
#if 0
playGenericSound(this->hidden->mixbuf, this->hidden->mixlen);
// sound->data = this->hidden->mixbuf;/* pointer to raw audio data */
// sound->len = this->hidden->mixlen; /* size of raw data pointed to above */
// sound->rate = 22050; /* sample rate = 22050Hz */

View file

@ -32,7 +32,6 @@
struct SDL_PrivateAudioData
{
TransferSoundData *sound;
/* The file descriptor for the audio device */
Uint8 *mixbuf;
Uint32 mixlen;