comparison src/audio/SDL_audio.c @ 3976:8582c6a5ca16 SDL-1.2

Added initial support for Nintendo DS, based on the work by Troy Davis (GPF)
author Sam Lantinga <slouken@libsdl.org>
date Mon, 25 Jun 2007 00:50:20 +0000
parents e85e65aec22f
children 6831b8723a85
comparison
equal deleted inserted replaced
3975:e85e65aec22f 3976:8582c6a5ca16
98 #if SDL_AUDIO_DRIVER_DUMMY 98 #if SDL_AUDIO_DRIVER_DUMMY
99 &DUMMYAUD_bootstrap, 99 &DUMMYAUD_bootstrap,
100 #endif 100 #endif
101 #if SDL_AUDIO_DRIVER_DC 101 #if SDL_AUDIO_DRIVER_DC
102 &DCAUD_bootstrap, 102 &DCAUD_bootstrap,
103 #endif
104 #if SDL_AUDIO_DRIVER_NDS
105 &NDSAUD_bootstrap,
103 #endif 106 #endif
104 #if SDL_AUDIO_DRIVER_MMEAUDIO 107 #if SDL_AUDIO_DRIVER_MMEAUDIO
105 &MMEAUDIO_bootstrap, 108 &MMEAUDIO_bootstrap,
106 #endif 109 #endif
107 #if SDL_AUDIO_DRIVER_DART 110 #if SDL_AUDIO_DRIVER_DART
468 if ( desired->callback == NULL ) { 471 if ( desired->callback == NULL ) {
469 SDL_SetError("SDL_OpenAudio() passed a NULL callback"); 472 SDL_SetError("SDL_OpenAudio() passed a NULL callback");
470 return(-1); 473 return(-1);
471 } 474 }
472 475
473 #if defined(__MACOS__) || (defined(__RISCOS__) && SDL_THREADS_DISABLED) 476 #if SDL_THREADS_DISABLED
474 /* FIXME: Need to implement PPC interrupt asm for SDL_LockAudio() */
475 #else
476 #if defined(__MINT__) && SDL_THREADS_DISABLED
477 /* Uses interrupt driven audio, without thread */ 477 /* Uses interrupt driven audio, without thread */
478 #else 478 #else
479 /* Create a semaphore for locking the sound buffers */ 479 /* Create a semaphore for locking the sound buffers */
480 audio->mixer_lock = SDL_CreateMutex(); 480 audio->mixer_lock = SDL_CreateMutex();
481 if ( audio->mixer_lock == NULL ) { 481 if ( audio->mixer_lock == NULL ) {
482 SDL_SetError("Couldn't create mixer lock"); 482 SDL_SetError("Couldn't create mixer lock");
483 SDL_CloseAudio(); 483 SDL_CloseAudio();
484 return(-1); 484 return(-1);
485 } 485 }
486 #endif /* __MINT__ */ 486 #endif /* SDL_THREADS_DISABLED */
487 #endif /* __MACOS__ */
488 487
489 /* Calculate the silence and size of the audio specification */ 488 /* Calculate the silence and size of the audio specification */
490 SDL_CalculateAudioSpec(desired); 489 SDL_CalculateAudioSpec(desired);
491 490
492 /* Open the audio subsystem */ 491 /* Open the audio subsystem */