Mercurial > sdl-ios-xcode
comparison src/audio/dc/SDL_dcaudio.c @ 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 | b225d9820ee3 |
children |
comparison
equal
deleted
inserted
replaced
3845:ee5dfa7f7993 | 3846:66fb40445587 |
---|---|
223 /* We're ready to rock and roll. :-) */ | 223 /* We're ready to rock and roll. :-) */ |
224 return 1; | 224 return 1; |
225 } | 225 } |
226 | 226 |
227 static int | 227 static int |
228 DCAUD_Available(void) | |
229 { | |
230 return 1; /* Dreamcast hardware is always available. :) */ | |
231 } | |
232 | |
233 static int | |
234 DCAUD_Init(SDL_AudioDriverImpl *impl) | 228 DCAUD_Init(SDL_AudioDriverImpl *impl) |
235 { | 229 { |
236 /* Set the function pointers */ | 230 /* Set the function pointers */ |
237 impl->OpenDevice = DCAUD_OpenDevice; | 231 impl->OpenDevice = DCAUD_OpenDevice; |
238 impl->PlayDevice = DCAUD_PlayDevice; | 232 impl->PlayDevice = DCAUD_PlayDevice; |
243 | 237 |
244 return 1; | 238 return 1; |
245 } | 239 } |
246 | 240 |
247 AudioBootStrap DCAUD_bootstrap = { | 241 AudioBootStrap DCAUD_bootstrap = { |
248 "dcaudio", "Dreamcast AICA audio", | 242 "dcaudio", "Dreamcast AICA audio", DCAUD_Init, 0 |
249 DCAUD_Available, DCAUD_Init, 0 | |
250 }; | 243 }; |
251 | 244 |
252 /* vi: set ts=4 sw=4 expandtab: */ | 245 /* vi: set ts=4 sw=4 expandtab: */ |