diff options
author | Chris Robinson <[email protected]> | 2011-08-17 06:05:26 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-08-17 06:05:26 -0700 |
commit | 8148626ba36456a5aed2b3e75bbe32f9e7ab0249 (patch) | |
tree | b5de5d71473e9b4a52e1200fb05c3c6a79233f39 | |
parent | 14ffb8bd9b148185a42aa691c3c3d0c3a04dbc95 (diff) |
Allow the backend init functions to return failure
-rw-r--r-- | Alc/ALc.c | 2 | ||||
-rw-r--r-- | Alc/alsa.c | 3 | ||||
-rw-r--r-- | Alc/coreaudio.c | 3 | ||||
-rw-r--r-- | Alc/dsound.c | 3 | ||||
-rw-r--r-- | Alc/loopback.c | 3 | ||||
-rw-r--r-- | Alc/mmdevapi.c | 3 | ||||
-rw-r--r-- | Alc/null.c | 3 | ||||
-rw-r--r-- | Alc/opensl.c | 3 | ||||
-rw-r--r-- | Alc/oss.c | 3 | ||||
-rw-r--r-- | Alc/portaudio.c | 3 | ||||
-rw-r--r-- | Alc/pulseaudio.c | 4 | ||||
-rw-r--r-- | Alc/sndio.c | 3 | ||||
-rw-r--r-- | Alc/solaris.c | 3 | ||||
-rw-r--r-- | Alc/wave.c | 3 | ||||
-rw-r--r-- | Alc/winmm.c | 3 | ||||
-rw-r--r-- | OpenAL32/Include/alMain.h | 28 |
16 files changed, 44 insertions, 29 deletions
@@ -65,7 +65,7 @@ DEFINE_GUID(IID_IAudioRenderClient, 0xf294acfc, 0x3146, 0x4483, 0xa7,0xbf, 0xad, #define EmptyFuncs { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } typedef struct BackendInfo { const char *name; - void (*Init)(BackendFuncs*); + ALCboolean (*Init)(BackendFuncs*); void (*Deinit)(void); void (*Probe)(enum DevProbe); BackendFuncs Funcs; @@ -1053,9 +1053,10 @@ static const BackendFuncs alsa_funcs = { alsa_available_samples }; -void alc_alsa_init(BackendFuncs *func_list) +ALCboolean alc_alsa_init(BackendFuncs *func_list) { *func_list = alsa_funcs; + return ALC_TRUE; } void alc_alsa_deinit(void) diff --git a/Alc/coreaudio.c b/Alc/coreaudio.c index 5a94f7d3..c84be846 100644 --- a/Alc/coreaudio.c +++ b/Alc/coreaudio.c @@ -692,9 +692,10 @@ static const BackendFuncs ca_funcs = { ca_available_samples }; -void alc_ca_init(BackendFuncs *func_list) +ALCboolean alc_ca_init(BackendFuncs *func_list) { *func_list = ca_funcs; + return ALC_TRUE; } void alc_ca_deinit(void) diff --git a/Alc/dsound.c b/Alc/dsound.c index 42139f3c..7f1524eb 100644 --- a/Alc/dsound.c +++ b/Alc/dsound.c @@ -610,9 +610,10 @@ static const BackendFuncs DSoundFuncs = { }; -void alcDSoundInit(BackendFuncs *FuncList) +ALCboolean alcDSoundInit(BackendFuncs *FuncList) { *FuncList = DSoundFuncs; + return ALC_TRUE; } void alcDSoundDeinit(void) diff --git a/Alc/loopback.c b/Alc/loopback.c index e8c5256e..86e53555 100644 --- a/Alc/loopback.c +++ b/Alc/loopback.c @@ -61,9 +61,10 @@ static const BackendFuncs loopback_funcs = { NULL }; -void alc_loopback_init(BackendFuncs *func_list) +ALCboolean alc_loopback_init(BackendFuncs *func_list) { *func_list = loopback_funcs; + return ALC_TRUE; } void alc_loopback_deinit(void) diff --git a/Alc/mmdevapi.c b/Alc/mmdevapi.c index ba5a36d6..de845ce0 100644 --- a/Alc/mmdevapi.c +++ b/Alc/mmdevapi.c @@ -751,9 +751,10 @@ static const BackendFuncs MMDevApiFuncs = { }; -void alcMMDevApiInit(BackendFuncs *FuncList) +ALCboolean alcMMDevApiInit(BackendFuncs *FuncList) { *FuncList = MMDevApiFuncs; + return ALC_TRUE; } void alcMMDevApiDeinit(void) @@ -146,9 +146,10 @@ static const BackendFuncs null_funcs = { NULL }; -void alc_null_init(BackendFuncs *func_list) +ALCboolean alc_null_init(BackendFuncs *func_list) { *func_list = null_funcs; + return ALC_TRUE; } void alc_null_deinit(void) diff --git a/Alc/opensl.c b/Alc/opensl.c index 40fa998f..744548fb 100644 --- a/Alc/opensl.c +++ b/Alc/opensl.c @@ -406,9 +406,10 @@ static const BackendFuncs opensl_funcs = { }; -void alc_opensl_init(BackendFuncs *func_list) +ALCboolean alc_opensl_init(BackendFuncs *func_list) { *func_list = opensl_funcs; + return ALC_TRUE; } void alc_opensl_deinit(void) @@ -489,9 +489,10 @@ static const BackendFuncs oss_funcs = { oss_available_samples }; -void alc_oss_init(BackendFuncs *func_list) +ALCboolean alc_oss_init(BackendFuncs *func_list) { *func_list = oss_funcs; + return ALC_TRUE; } void alc_oss_deinit(void) diff --git a/Alc/portaudio.c b/Alc/portaudio.c index 21f43ae2..e1447c02 100644 --- a/Alc/portaudio.c +++ b/Alc/portaudio.c @@ -418,9 +418,10 @@ static const BackendFuncs pa_funcs = { pa_available_samples }; -void alc_pa_init(BackendFuncs *func_list) +ALCboolean alc_pa_init(BackendFuncs *func_list) { *func_list = pa_funcs; + return ALC_TRUE; } void alc_pa_deinit(void) diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c index 5900d728..3aa7e199 100644 --- a/Alc/pulseaudio.c +++ b/Alc/pulseaudio.c @@ -1296,13 +1296,15 @@ static const BackendFuncs pulse_funcs = { //{{{ pulse_available_samples }; //}}} -void alc_pulse_init(BackendFuncs *func_list) //{{{ +ALCboolean alc_pulse_init(BackendFuncs *func_list) //{{{ { *func_list = pulse_funcs; pulse_ctx_flags = 0; if(!GetConfigValueBool("pulse", "spawn-server", 0)) pulse_ctx_flags |= PA_CONTEXT_NOAUTOSPAWN; + + return ALC_TRUE; } //}}} void alc_pulse_deinit(void) //{{{ diff --git a/Alc/sndio.c b/Alc/sndio.c index 4c61dffd..ba6063dd 100644 --- a/Alc/sndio.c +++ b/Alc/sndio.c @@ -360,9 +360,10 @@ static const BackendFuncs sndio_funcs = { NULL }; -void alc_sndio_init(BackendFuncs *func_list) +ALCboolean alc_sndio_init(BackendFuncs *func_list) { *func_list = sndio_funcs; + return ALC_TRUE; } void alc_sndio_deinit(void) diff --git a/Alc/solaris.c b/Alc/solaris.c index d020ed4b..9ddc1dc6 100644 --- a/Alc/solaris.c +++ b/Alc/solaris.c @@ -286,9 +286,10 @@ static const BackendFuncs solaris_funcs = { solaris_available_samples }; -void alc_solaris_init(BackendFuncs *func_list) +ALCboolean alc_solaris_init(BackendFuncs *func_list) { *func_list = solaris_funcs; + return ALC_TRUE; } void alc_solaris_deinit(void) @@ -334,9 +334,10 @@ static const BackendFuncs wave_funcs = { NULL }; -void alc_wave_init(BackendFuncs *func_list) +ALCboolean alc_wave_init(BackendFuncs *func_list) { *func_list = wave_funcs; + return ALC_TRUE; } void alc_wave_deinit(void) diff --git a/Alc/winmm.c b/Alc/winmm.c index 08a626df..94c9b794 100644 --- a/Alc/winmm.c +++ b/Alc/winmm.c @@ -719,9 +719,10 @@ static const BackendFuncs WinMMFuncs = { WinMMAvailableSamples }; -void alcWinMMInit(BackendFuncs *FuncList) +ALCboolean alcWinMMInit(BackendFuncs *FuncList) { *FuncList = WinMMFuncs; + return ALC_TRUE; } void alcWinMMDeinit() diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 5873feb1..9a6c0c2b 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -279,46 +279,46 @@ enum DevProbe { CAPTURE_DEVICE_PROBE }; -void alc_alsa_init(BackendFuncs *func_list); +ALCboolean alc_alsa_init(BackendFuncs *func_list); void alc_alsa_deinit(void); void alc_alsa_probe(enum DevProbe type); -void alc_oss_init(BackendFuncs *func_list); +ALCboolean alc_oss_init(BackendFuncs *func_list); void alc_oss_deinit(void); void alc_oss_probe(enum DevProbe type); -void alc_solaris_init(BackendFuncs *func_list); +ALCboolean alc_solaris_init(BackendFuncs *func_list); void alc_solaris_deinit(void); void alc_solaris_probe(enum DevProbe type); -void alc_sndio_init(BackendFuncs *func_list); +ALCboolean alc_sndio_init(BackendFuncs *func_list); void alc_sndio_deinit(void); void alc_sndio_probe(enum DevProbe type); -void alcMMDevApiInit(BackendFuncs *func_list); +ALCboolean alcMMDevApiInit(BackendFuncs *func_list); void alcMMDevApiDeinit(void); void alcMMDevApiProbe(enum DevProbe type); -void alcDSoundInit(BackendFuncs *func_list); +ALCboolean alcDSoundInit(BackendFuncs *func_list); void alcDSoundDeinit(void); void alcDSoundProbe(enum DevProbe type); -void alcWinMMInit(BackendFuncs *FuncList); +ALCboolean alcWinMMInit(BackendFuncs *FuncList); void alcWinMMDeinit(void); void alcWinMMProbe(enum DevProbe type); -void alc_pa_init(BackendFuncs *func_list); +ALCboolean alc_pa_init(BackendFuncs *func_list); void alc_pa_deinit(void); void alc_pa_probe(enum DevProbe type); -void alc_wave_init(BackendFuncs *func_list); +ALCboolean alc_wave_init(BackendFuncs *func_list); void alc_wave_deinit(void); void alc_wave_probe(enum DevProbe type); -void alc_pulse_init(BackendFuncs *func_list); +ALCboolean alc_pulse_init(BackendFuncs *func_list); void alc_pulse_deinit(void); void alc_pulse_probe(enum DevProbe type); -void alc_ca_init(BackendFuncs *func_list); +ALCboolean alc_ca_init(BackendFuncs *func_list); void alc_ca_deinit(void); void alc_ca_probe(enum DevProbe type); -void alc_opensl_init(BackendFuncs *func_list); +ALCboolean alc_opensl_init(BackendFuncs *func_list); void alc_opensl_deinit(void); void alc_opensl_probe(enum DevProbe type); -void alc_null_init(BackendFuncs *func_list); +ALCboolean alc_null_init(BackendFuncs *func_list); void alc_null_deinit(void); void alc_null_probe(enum DevProbe type); -void alc_loopback_init(BackendFuncs *func_list); +ALCboolean alc_loopback_init(BackendFuncs *func_list); void alc_loopback_deinit(void); void alc_loopback_probe(enum DevProbe type); |