comparison src/audio/macosx/SDL_coreaudio.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 29e83f221c62
children
comparison
equal deleted inserted replaced
3845:ee5dfa7f7993 3846:66fb40445587
199 } 199 }
200 200
201 return 0; 201 return 0;
202 } 202 }
203 203
204 static int
205 COREAUDIO_Available(void)
206 {
207 return 1; /* always available on Mac OS X. */
208 }
209 204
210 static int 205 static int
211 COREAUDIO_DetectDevices(int iscapture) 206 COREAUDIO_DetectDevices(int iscapture)
212 { 207 {
213 if (iscapture) { 208 if (iscapture) {
580 575
581 return 1; 576 return 1;
582 } 577 }
583 578
584 AudioBootStrap COREAUDIO_bootstrap = { 579 AudioBootStrap COREAUDIO_bootstrap = {
585 "coreaudio", "Mac OS X CoreAudio", 580 "coreaudio", "Mac OS X CoreAudio", COREAUDIO_Init, 0
586 COREAUDIO_Available, COREAUDIO_Init, 0
587 }; 581 };
588 582
589 /* vi: set ts=4 sw=4 expandtab: */ 583 /* vi: set ts=4 sw=4 expandtab: */