aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends')
-rw-r--r--Alc/backends/alsa.c10
-rw-r--r--Alc/backends/null.c34
-rw-r--r--Alc/backends/oss.c10
-rw-r--r--Alc/backends/pulseaudio.c20
4 files changed, 39 insertions, 35 deletions
diff --git a/Alc/backends/alsa.c b/Alc/backends/alsa.c
index 232a9a5c..7e9e5e79 100644
--- a/Alc/backends/alsa.c
+++ b/Alc/backends/alsa.c
@@ -1360,14 +1360,14 @@ typedef struct ALCalsaBackendFactory {
} ALCalsaBackendFactory;
#define ALCALSABACKENDFACTORY_INITIALIZER { { GET_VTABLE2(ALCalsaBackendFactory, ALCbackendFactory) } }
-ALCboolean ALCalsaBackendFactory_init(ALCalsaBackendFactory* UNUSED(self))
+static ALCboolean ALCalsaBackendFactory_init(ALCalsaBackendFactory* UNUSED(self))
{
if(!alsa_load())
return ALC_FALSE;
return ALC_TRUE;
}
-void ALCalsaBackendFactory_deinit(ALCalsaBackendFactory* UNUSED(self))
+static void ALCalsaBackendFactory_deinit(ALCalsaBackendFactory* UNUSED(self))
{
ALuint i;
@@ -1396,14 +1396,14 @@ void ALCalsaBackendFactory_deinit(ALCalsaBackendFactory* UNUSED(self))
#endif
}
-ALCboolean ALCalsaBackendFactory_querySupport(ALCalsaBackendFactory* UNUSED(self), ALCbackend_Type type)
+static ALCboolean ALCalsaBackendFactory_querySupport(ALCalsaBackendFactory* UNUSED(self), ALCbackend_Type type)
{
if(type == ALCbackend_Playback || type == ALCbackend_Capture)
return ALC_TRUE;
return ALC_FALSE;
}
-void ALCalsaBackendFactory_probe(ALCalsaBackendFactory* UNUSED(self), enum DevProbe type)
+static void ALCalsaBackendFactory_probe(ALCalsaBackendFactory* UNUSED(self), enum DevProbe type)
{
ALuint i;
@@ -1439,7 +1439,7 @@ void ALCalsaBackendFactory_probe(ALCalsaBackendFactory* UNUSED(self), enum DevPr
}
}
-ALCbackend* ALCalsaBackendFactory_createBackend(ALCalsaBackendFactory* UNUSED(self), ALCdevice *device, ALCbackend_Type type)
+static ALCbackend* ALCalsaBackendFactory_createBackend(ALCalsaBackendFactory* UNUSED(self), ALCdevice *device, ALCbackend_Type type)
{
if(type == ALCbackend_Playback)
{
diff --git a/Alc/backends/null.c b/Alc/backends/null.c
index 6068d990..a7056369 100644
--- a/Alc/backends/null.c
+++ b/Alc/backends/null.c
@@ -166,23 +166,36 @@ typedef struct ALCnullBackendFactory {
} ALCnullBackendFactory;
#define ALCNULLBACKENDFACTORY_INITIALIZER { { GET_VTABLE2(ALCnullBackendFactory, ALCbackendFactory) } }
-ALCboolean ALCnullBackendFactory_init(ALCnullBackendFactory* UNUSED(self))
+ALCbackendFactory *ALCnullBackendFactory_getFactory(void);
+
+static ALCboolean ALCnullBackendFactory_init(ALCnullBackendFactory *self);
+static DECLARE_FORWARD(ALCnullBackendFactory, ALCbackendFactory, void, deinit)
+static ALCboolean ALCnullBackendFactory_querySupport(ALCnullBackendFactory *self, ALCbackend_Type type);
+static void ALCnullBackendFactory_probe(ALCnullBackendFactory *self, enum DevProbe type);
+static ALCbackend* ALCnullBackendFactory_createBackend(ALCnullBackendFactory *self, ALCdevice *device, ALCbackend_Type type);
+DEFINE_ALCBACKENDFACTORY_VTABLE(ALCnullBackendFactory);
+
+
+ALCbackendFactory *ALCnullBackendFactory_getFactory(void)
{
- return ALC_TRUE;
+ static ALCnullBackendFactory factory = ALCNULLBACKENDFACTORY_INITIALIZER;
+ return STATIC_CAST(ALCbackendFactory, &factory);
}
-void ALCnullBackendFactory_deinit(ALCnullBackendFactory* UNUSED(self))
+
+static ALCboolean ALCnullBackendFactory_init(ALCnullBackendFactory* UNUSED(self))
{
+ return ALC_TRUE;
}
-ALCboolean ALCnullBackendFactory_querySupport(ALCnullBackendFactory* UNUSED(self), ALCbackend_Type type)
+static ALCboolean ALCnullBackendFactory_querySupport(ALCnullBackendFactory* UNUSED(self), ALCbackend_Type type)
{
if(type == ALCbackend_Playback)
return ALC_TRUE;
return ALC_FALSE;
}
-void ALCnullBackendFactory_probe(ALCnullBackendFactory* UNUSED(self), enum DevProbe type)
+static void ALCnullBackendFactory_probe(ALCnullBackendFactory* UNUSED(self), enum DevProbe type)
{
switch(type)
{
@@ -194,7 +207,7 @@ void ALCnullBackendFactory_probe(ALCnullBackendFactory* UNUSED(self), enum DevPr
}
}
-ALCbackend* ALCnullBackendFactory_createBackend(ALCnullBackendFactory* UNUSED(self), ALCdevice *device, ALCbackend_Type type)
+static ALCbackend* ALCnullBackendFactory_createBackend(ALCnullBackendFactory* UNUSED(self), ALCdevice *device, ALCbackend_Type type)
{
ALCnullBackend *backend;
@@ -207,12 +220,3 @@ ALCbackend* ALCnullBackendFactory_createBackend(ALCnullBackendFactory* UNUSED(se
return STATIC_CAST(ALCbackend, backend);
}
-
-DEFINE_ALCBACKENDFACTORY_VTABLE(ALCnullBackendFactory);
-
-
-ALCbackendFactory *ALCnullBackendFactory_getFactory(void)
-{
- static ALCnullBackendFactory factory = ALCNULLBACKENDFACTORY_INITIALIZER;
- return STATIC_CAST(ALCbackendFactory, &factory);
-}
diff --git a/Alc/backends/oss.c b/Alc/backends/oss.c
index 3d7de113..c79793c2 100644
--- a/Alc/backends/oss.c
+++ b/Alc/backends/oss.c
@@ -553,11 +553,11 @@ typedef struct ALCossBackendFactory {
ALCbackendFactory *ALCossBackendFactory_getFactory(void);
-ALCboolean ALCossBackendFactory_init(ALCossBackendFactory *self);
-DECLARE_FORWARD(ALCossBackendFactory, ALCbackendFactory, void, deinit)
-ALCboolean ALCossBackendFactory_querySupport(ALCossBackendFactory *self, ALCbackend_Type type);
-void ALCossBackendFactory_probe(ALCossBackendFactory *self, enum DevProbe type);
-ALCbackend* ALCossBackendFactory_createBackend(ALCossBackendFactory *self, ALCdevice *device, ALCbackend_Type type);
+static ALCboolean ALCossBackendFactory_init(ALCossBackendFactory *self);
+static DECLARE_FORWARD(ALCossBackendFactory, ALCbackendFactory, void, deinit)
+static ALCboolean ALCossBackendFactory_querySupport(ALCossBackendFactory *self, ALCbackend_Type type);
+static void ALCossBackendFactory_probe(ALCossBackendFactory *self, enum DevProbe type);
+static ALCbackend* ALCossBackendFactory_createBackend(ALCossBackendFactory *self, ALCdevice *device, ALCbackend_Type type);
DEFINE_ALCBACKENDFACTORY_VTABLE(ALCossBackendFactory);
diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c
index 54265df3..e2ae52ae 100644
--- a/Alc/backends/pulseaudio.c
+++ b/Alc/backends/pulseaudio.c
@@ -1602,7 +1602,7 @@ typedef struct ALCpulseBackendFactory {
} ALCpulseBackendFactory;
#define ALCPULSEBACKENDFACTORY_INITIALIZER { { GET_VTABLE2(ALCpulseBackendFactory, ALCbackendFactory) } }
-ALCboolean ALCpulseBackendFactory_init(ALCpulseBackendFactory* UNUSED(self))
+static ALCboolean ALCpulseBackendFactory_init(ALCpulseBackendFactory* UNUSED(self))
{
ALCboolean ret = ALC_FALSE;
@@ -1646,7 +1646,7 @@ ALCboolean ALCpulseBackendFactory_init(ALCpulseBackendFactory* UNUSED(self))
return ret;
}
-void ALCpulseBackendFactory_deinit(ALCpulseBackendFactory* UNUSED(self))
+static void ALCpulseBackendFactory_deinit(ALCpulseBackendFactory* UNUSED(self))
{
ALuint i;
@@ -1675,14 +1675,14 @@ void ALCpulseBackendFactory_deinit(ALCpulseBackendFactory* UNUSED(self))
/* PulseAudio doesn't like being CloseLib'd sometimes */
}
-ALCboolean ALCpulseBackendFactory_querySupport(ALCpulseBackendFactory* UNUSED(self), ALCbackend_Type type)
+static ALCboolean ALCpulseBackendFactory_querySupport(ALCpulseBackendFactory* UNUSED(self), ALCbackend_Type type)
{
if(type == ALCbackend_Playback || type == ALCbackend_Capture)
return ALC_TRUE;
return ALC_FALSE;
}
-void ALCpulseBackendFactory_probe(ALCpulseBackendFactory* UNUSED(self), enum DevProbe type)
+static void ALCpulseBackendFactory_probe(ALCpulseBackendFactory* UNUSED(self), enum DevProbe type)
{
ALuint i;
@@ -1722,7 +1722,7 @@ void ALCpulseBackendFactory_probe(ALCpulseBackendFactory* UNUSED(self), enum Dev
}
}
-ALCbackend* ALCpulseBackendFactory_createBackend(ALCpulseBackendFactory* UNUSED(self), ALCdevice *device, ALCbackend_Type type)
+static ALCbackend* ALCpulseBackendFactory_createBackend(ALCpulseBackendFactory* UNUSED(self), ALCdevice *device, ALCbackend_Type type)
{
if(type == ALCbackend_Playback)
{
@@ -1762,25 +1762,25 @@ typedef struct ALCpulseBackendFactory {
} ALCpulseBackendFactory;
#define ALCPULSEBACKENDFACTORY_INITIALIZER { { GET_VTABLE2(ALCpulseBackendFactory, ALCbackendFactory) } }
-ALCboolean ALCpulseBackendFactory_init(ALCpulseBackendFactory* UNUSED(self))
+static ALCboolean ALCpulseBackendFactory_init(ALCpulseBackendFactory* UNUSED(self))
{
return ALC_FALSE;
}
-void ALCpulseBackendFactory_deinit(ALCpulseBackendFactory* UNUSED(self))
+static void ALCpulseBackendFactory_deinit(ALCpulseBackendFactory* UNUSED(self))
{
}
-ALCboolean ALCpulseBackendFactory_querySupport(ALCpulseBackendFactory* UNUSED(self), ALCbackend_Type UNUSED(type))
+static ALCboolean ALCpulseBackendFactory_querySupport(ALCpulseBackendFactory* UNUSED(self), ALCbackend_Type UNUSED(type))
{
return ALC_FALSE;
}
-void ALCpulseBackendFactory_probe(ALCpulseBackendFactory* UNUSED(self), enum DevProbe UNUSED(type))
+static void ALCpulseBackendFactory_probe(ALCpulseBackendFactory* UNUSED(self), enum DevProbe UNUSED(type))
{
}
-ALCbackend* ALCpulseBackendFactory_createBackend(ALCpulseBackendFactory* UNUSED(self), ALCdevice* UNUSED(device), ALCbackend_Type UNUSED(type))
+static ALCbackend* ALCpulseBackendFactory_createBackend(ALCpulseBackendFactory* UNUSED(self), ALCdevice* UNUSED(device), ALCbackend_Type UNUSED(type))
{
return NULL;
}