diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 16 | ||||
-rw-r--r-- | Alc/backends/base.c | 32 | ||||
-rw-r--r-- | Alc/backends/coreaudio.c | 2 | ||||
-rw-r--r-- | Alc/backends/dsound.c | 2 | ||||
-rw-r--r-- | Alc/backends/mmdevapi.c | 2 | ||||
-rw-r--r-- | Alc/backends/opensl.c | 2 | ||||
-rw-r--r-- | Alc/backends/portaudio.c | 2 | ||||
-rw-r--r-- | Alc/backends/qsa.c | 2 | ||||
-rw-r--r-- | Alc/backends/sndio.c | 2 | ||||
-rw-r--r-- | Alc/backends/solaris.c | 2 | ||||
-rw-r--r-- | Alc/backends/wave.c | 2 | ||||
-rw-r--r-- | Alc/backends/winmm.c | 2 |
12 files changed, 7 insertions, 61 deletions
@@ -53,7 +53,7 @@ struct BackendInfo { BackendFuncs Funcs; }; -#define EmptyFuncs { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } +#define EmptyFuncs { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } static struct BackendInfo BackendList[] = { #ifdef HAVE_PULSEAUDIO { "pulse", ALCpulseBackendFactory_getFactory, NULL, NULL, NULL, EmptyFuncs }, @@ -1386,21 +1386,14 @@ static ALCboolean IsValidALCChannels(ALCenum channels) /************************************************ * Miscellaneous ALC helpers ************************************************/ +extern inline void LockContext(ALCcontext *context); +extern inline void UnlockContext(ALCcontext *context); -void ALCdevice_LockDefault(ALCdevice *device) -{ - ALCbackend_lock(device->Backend); -} -void ALCdevice_UnlockDefault(ALCdevice *device) -{ - ALCbackend_unlock(device->Backend); -} ALint64 ALCdevice_GetLatencyDefault(ALCdevice *UNUSED(device)) { return 0; } - ALint64 ALCdevice_GetLatency(ALCdevice *device) { return V0(device->Backend,getLatency)(); @@ -1416,9 +1409,6 @@ void ALCdevice_Unlock(ALCdevice *device) V0(device->Backend,unlock)(); } -extern inline void LockContext(ALCcontext *context); -extern inline void UnlockContext(ALCcontext *context); - /* SetDefaultWFXChannelOrder * diff --git a/Alc/backends/base.c b/Alc/backends/base.c index a6163c08..d9ef3e99 100644 --- a/Alc/backends/base.c +++ b/Alc/backends/base.c @@ -72,8 +72,8 @@ static void PlaybackWrapper_stop(PlaybackWrapper *self); static DECLARE_FORWARD2(PlaybackWrapper, ALCbackend, ALCenum, captureSamples, void*, ALCuint) static DECLARE_FORWARD(PlaybackWrapper, ALCbackend, ALCuint, availableSamples) static ALint64 PlaybackWrapper_getLatency(PlaybackWrapper *self); -static void PlaybackWrapper_lock(PlaybackWrapper *self); -static void PlaybackWrapper_unlock(PlaybackWrapper *self); +static DECLARE_FORWARD(PlaybackWrapper, ALCbackend, void, lock) +static DECLARE_FORWARD(PlaybackWrapper, ALCbackend, void, unlock) static void PlaybackWrapper_Delete(PlaybackWrapper *self); DEFINE_ALCBACKEND_VTABLE(PlaybackWrapper); @@ -119,18 +119,6 @@ static ALint64 PlaybackWrapper_getLatency(PlaybackWrapper *self) return device->Funcs->GetLatency(device); } -static void PlaybackWrapper_lock(PlaybackWrapper *self) -{ - ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice; - device->Funcs->Lock(device); -} - -static void PlaybackWrapper_unlock(PlaybackWrapper *self) -{ - ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice; - device->Funcs->Unlock(device); -} - static void PlaybackWrapper_Delete(PlaybackWrapper *self) { free(self); @@ -151,8 +139,8 @@ static void CaptureWrapper_stop(CaptureWrapper *self); ALCenum CaptureWrapper_captureSamples(CaptureWrapper *self, void *buffer, ALCuint samples); ALCuint CaptureWrapper_availableSamples(CaptureWrapper *self); static ALint64 CaptureWrapper_getLatency(CaptureWrapper *self); -static void CaptureWrapper_lock(CaptureWrapper *self); -static void CaptureWrapper_unlock(CaptureWrapper *self); +static DECLARE_FORWARD(CaptureWrapper, ALCbackend, void, lock) +static DECLARE_FORWARD(CaptureWrapper, ALCbackend, void, unlock) static void CaptureWrapper_Delete(CaptureWrapper *self); DEFINE_ALCBACKEND_VTABLE(CaptureWrapper); @@ -206,18 +194,6 @@ static ALint64 CaptureWrapper_getLatency(CaptureWrapper *self) return device->Funcs->GetLatency(device); } -static void CaptureWrapper_lock(CaptureWrapper *self) -{ - ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice; - device->Funcs->Lock(device); -} - -static void CaptureWrapper_unlock(CaptureWrapper *self) -{ - ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice; - device->Funcs->Unlock(device); -} - static void CaptureWrapper_Delete(CaptureWrapper *self) { free(self); diff --git a/Alc/backends/coreaudio.c b/Alc/backends/coreaudio.c index 150f37ac..5c9b69c8 100644 --- a/Alc/backends/coreaudio.c +++ b/Alc/backends/coreaudio.c @@ -677,8 +677,6 @@ static const BackendFuncs ca_funcs = { ca_stop_capture, ca_capture_samples, ca_available_samples, - ALCdevice_LockDefault, - ALCdevice_UnlockDefault, ALCdevice_GetLatencyDefault }; diff --git a/Alc/backends/dsound.c b/Alc/backends/dsound.c index 9fa4bd61..0c4f816b 100644 --- a/Alc/backends/dsound.c +++ b/Alc/backends/dsound.c @@ -955,8 +955,6 @@ static const BackendFuncs DSoundFuncs = { DSoundStopCapture, DSoundCaptureSamples, DSoundAvailableSamples, - ALCdevice_LockDefault, - ALCdevice_UnlockDefault, ALCdevice_GetLatencyDefault }; diff --git a/Alc/backends/mmdevapi.c b/Alc/backends/mmdevapi.c index 31be2ed1..8bbbbddb 100644 --- a/Alc/backends/mmdevapi.c +++ b/Alc/backends/mmdevapi.c @@ -968,8 +968,6 @@ static const BackendFuncs MMDevApiFuncs = { NULL, NULL, NULL, - ALCdevice_LockDefault, - ALCdevice_UnlockDefault, MMDevApiGetLatency }; diff --git a/Alc/backends/opensl.c b/Alc/backends/opensl.c index 1a104029..4e260879 100644 --- a/Alc/backends/opensl.c +++ b/Alc/backends/opensl.c @@ -420,8 +420,6 @@ static const BackendFuncs opensl_funcs = { NULL, NULL, NULL, - ALCdevice_LockDefault, - ALCdevice_UnlockDefault, ALCdevice_GetLatencyDefault }; diff --git a/Alc/backends/portaudio.c b/Alc/backends/portaudio.c index fde1f59d..162788fc 100644 --- a/Alc/backends/portaudio.c +++ b/Alc/backends/portaudio.c @@ -427,8 +427,6 @@ static const BackendFuncs pa_funcs = { pa_stop_capture, pa_capture_samples, pa_available_samples, - ALCdevice_LockDefault, - ALCdevice_UnlockDefault, ALCdevice_GetLatencyDefault }; diff --git a/Alc/backends/qsa.c b/Alc/backends/qsa.c index d91ffb2c..ae3ace61 100644 --- a/Alc/backends/qsa.c +++ b/Alc/backends/qsa.c @@ -1109,8 +1109,6 @@ BackendFuncs qsa_funcs= qsa_stop_capture, qsa_capture_samples, qsa_available_samples, - ALCdevice_LockDefault, - ALCdevice_UnlockDefault, qsa_get_latency, }; diff --git a/Alc/backends/sndio.c b/Alc/backends/sndio.c index d61ab3df..80aebfd1 100644 --- a/Alc/backends/sndio.c +++ b/Alc/backends/sndio.c @@ -267,8 +267,6 @@ static const BackendFuncs sndio_funcs = { NULL, NULL, NULL, - ALCdevice_LockDefault, - ALCdevice_UnlockDefault, ALCdevice_GetLatencyDefault }; diff --git a/Alc/backends/solaris.c b/Alc/backends/solaris.c index c4d40273..700131c8 100644 --- a/Alc/backends/solaris.c +++ b/Alc/backends/solaris.c @@ -253,8 +253,6 @@ static const BackendFuncs solaris_funcs = { NULL, NULL, NULL, - ALCdevice_LockDefault, - ALCdevice_UnlockDefault, ALCdevice_GetLatencyDefault }; diff --git a/Alc/backends/wave.c b/Alc/backends/wave.c index ec88862b..2fafc4b9 100644 --- a/Alc/backends/wave.c +++ b/Alc/backends/wave.c @@ -343,8 +343,6 @@ static const BackendFuncs wave_funcs = { NULL, NULL, NULL, - ALCdevice_LockDefault, - ALCdevice_UnlockDefault, ALCdevice_GetLatencyDefault }; diff --git a/Alc/backends/winmm.c b/Alc/backends/winmm.c index 5a64645b..f268aca7 100644 --- a/Alc/backends/winmm.c +++ b/Alc/backends/winmm.c @@ -713,8 +713,6 @@ static const BackendFuncs WinMMFuncs = { WinMMStopCapture, WinMMCaptureSamples, WinMMAvailableSamples, - ALCdevice_LockDefault, - ALCdevice_UnlockDefault, ALCdevice_GetLatencyDefault }; |