comparison src/audio/windib/SDL_dibaudio.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 3479f939987c
children
comparison
equal deleted inserted replaced
3845:ee5dfa7f7993 3846:66fb40445587
40 #elif defined(WIN64) 40 #elif defined(WIN64)
41 #define WINDOWS_OS_NAME "Win64" 41 #define WINDOWS_OS_NAME "Win64"
42 #else 42 #else
43 #define WINDOWS_OS_NAME "Win32" 43 #define WINDOWS_OS_NAME "Win32"
44 #endif 44 #endif
45
46 static int
47 WINWAVEOUT_Available(void)
48 {
49 return 1; /* Always available on win32/pocketpc systems... */
50 }
51 45
52 /* The Win32 callback for filling the WAVE device */ 46 /* The Win32 callback for filling the WAVE device */
53 static void CALLBACK 47 static void CALLBACK
54 FillSound(HWAVEOUT hwo, UINT uMsg, DWORD_PTR dwInstance, 48 FillSound(HWAVEOUT hwo, UINT uMsg, DWORD_PTR dwInstance,
55 DWORD dwParam1, DWORD dwParam2) 49 DWORD dwParam1, DWORD dwParam2)
334 328
335 return 1; 329 return 1;
336 } 330 }
337 331
338 AudioBootStrap WINWAVEOUT_bootstrap = { 332 AudioBootStrap WINWAVEOUT_bootstrap = {
339 "waveout", WINDOWS_OS_NAME " WaveOut", 333 "waveout", WINDOWS_OS_NAME " WaveOut", WINWAVEOUT_Init, 0
340 WINWAVEOUT_Available, WINWAVEOUT_Init, 0
341 }; 334 };
342 335
343 /* vi: set ts=4 sw=4 expandtab: */ 336 /* vi: set ts=4 sw=4 expandtab: */