aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-08-17 06:05:26 -0700
committerChris Robinson <[email protected]>2011-08-17 06:05:26 -0700
commit8148626ba36456a5aed2b3e75bbe32f9e7ab0249 (patch)
treeb5de5d71473e9b4a52e1200fb05c3c6a79233f39 /Alc
parent14ffb8bd9b148185a42aa691c3c3d0c3a04dbc95 (diff)
Allow the backend init functions to return failure
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c2
-rw-r--r--Alc/alsa.c3
-rw-r--r--Alc/coreaudio.c3
-rw-r--r--Alc/dsound.c3
-rw-r--r--Alc/loopback.c3
-rw-r--r--Alc/mmdevapi.c3
-rw-r--r--Alc/null.c3
-rw-r--r--Alc/opensl.c3
-rw-r--r--Alc/oss.c3
-rw-r--r--Alc/portaudio.c3
-rw-r--r--Alc/pulseaudio.c4
-rw-r--r--Alc/sndio.c3
-rw-r--r--Alc/solaris.c3
-rw-r--r--Alc/wave.c3
-rw-r--r--Alc/winmm.c3
15 files changed, 30 insertions, 15 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 14469834..9fa7135d 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -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;
diff --git a/Alc/alsa.c b/Alc/alsa.c
index e2a2fa91..cd6df594 100644
--- a/Alc/alsa.c
+++ b/Alc/alsa.c
@@ -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)
diff --git a/Alc/null.c b/Alc/null.c
index 1f83df34..76c5af1c 100644
--- a/Alc/null.c
+++ b/Alc/null.c
@@ -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)
diff --git a/Alc/oss.c b/Alc/oss.c
index 6583d785..724b23c2 100644
--- a/Alc/oss.c
+++ b/Alc/oss.c
@@ -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)
diff --git a/Alc/wave.c b/Alc/wave.c
index 67c5a33d..689bd7cb 100644
--- a/Alc/wave.c
+++ b/Alc/wave.c
@@ -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()