comparison src/audio/baudio/SDL_beaudio.cc @ 3846:66fb40445587 SDL-ryan-multiple-audio-device

Removed distinction between "available" and "init" in audio backends, since both had to be checked for success as a pair at the higher level and several of the Available methods were just always-succeed placeholders anyhow. Now the availability check is done in the init code, and the higher level tries all possible drivers until one manages to initialize successfully.
author Ryan C. Gordon <icculus@icculus.org>
date Tue, 17 Oct 2006 09:09:21 +0000
parents 7c9663fb0860
children
comparison
equal deleted inserted replaced
3845:ee5dfa7f7993 3846:66fb40445587
34 #include "../SDL_audio_c.h" 34 #include "../SDL_audio_c.h"
35 #include "../SDL_sysaudio.h" 35 #include "../SDL_sysaudio.h"
36 #include "../../thread/beos/SDL_systhread_c.h" 36 #include "../../thread/beos/SDL_systhread_c.h"
37 #include "SDL_beaudio.h" 37 #include "SDL_beaudio.h"
38 38
39 }
40
41
42 static int BEOSAUDIO_Available(void)
43 {
44 return 1; /* Always available on BeOS. */
45 } 39 }
46 40
47 41
48 /* !!! FIXME: have the callback call the higher level to avoid code dupe. */ 42 /* !!! FIXME: have the callback call the higher level to avoid code dupe. */
49 /* The BeOS callback for handling the audio buffer */ 43 /* The BeOS callback for handling the audio buffer */
213 return 1; 207 return 1;
214 } 208 }
215 209
216 extern "C" { extern AudioBootStrap BEOSAUDIO_bootstrap; } 210 extern "C" { extern AudioBootStrap BEOSAUDIO_bootstrap; }
217 AudioBootStrap BEOSAUDIO_bootstrap = { 211 AudioBootStrap BEOSAUDIO_bootstrap = {
218 "baudio", "BeOS BSoundPlayer", 212 "baudio", "BeOS BSoundPlayer", BEOSAUDIO_Init, 0
219 BEOSAUDIO_Available, BEOSAUDIO_Init, 0
220 }; 213 };
221 214
222 /* vi: set ts=4 sw=4 expandtab: */ 215 /* vi: set ts=4 sw=4 expandtab: */
223 216