aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/ALc.c7
-rw-r--r--Alc/backends/base.c17
-rw-r--r--Alc/backends/coreaudio.c3
-rw-r--r--Alc/backends/opensl.c3
-rw-r--r--Alc/backends/portaudio.c3
-rw-r--r--Alc/backends/qsa.c14
-rw-r--r--Alc/backends/sndio.c3
-rw-r--r--Alc/backends/solaris.c3
-rw-r--r--OpenAL32/Include/alMain.h4
9 files changed, 10 insertions, 47 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 5697017d..4d4d8e4e 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -59,7 +59,7 @@ struct BackendInfo {
BackendFuncs Funcs;
};
-#define EmptyFuncs { 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 }
static struct BackendInfo BackendList[] = {
#ifdef HAVE_PULSEAUDIO
{ "pulse", ALCpulseBackendFactory_getFactory, NULL, NULL, NULL, EmptyFuncs },
@@ -1424,11 +1424,6 @@ DECL_CONST static ALCboolean IsValidALCChannels(ALCenum channels)
extern inline void LockContext(ALCcontext *context);
extern inline void UnlockContext(ALCcontext *context);
-ALint64 ALCdevice_GetLatencyDefault(ALCdevice *UNUSED(device))
-{
- return 0;
-}
-
ALint64 ALCdevice_GetLatency(ALCdevice *device)
{
return V0(device->Backend,getLatency)();
diff --git a/Alc/backends/base.c b/Alc/backends/base.c
index 37e4ccc9..b800335a 100644
--- a/Alc/backends/base.c
+++ b/Alc/backends/base.c
@@ -77,7 +77,7 @@ static ALCboolean PlaybackWrapper_start(PlaybackWrapper *self);
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 DECLARE_FORWARD(PlaybackWrapper, ALCbackend, ALint64, getLatency)
static DECLARE_FORWARD(PlaybackWrapper, ALCbackend, void, lock)
static DECLARE_FORWARD(PlaybackWrapper, ALCbackend, void, unlock)
DECLARE_DEFAULT_ALLOCATORS(PlaybackWrapper)
@@ -121,12 +121,6 @@ static void PlaybackWrapper_stop(PlaybackWrapper *self)
self->Funcs->StopPlayback(device);
}
-static ALint64 PlaybackWrapper_getLatency(PlaybackWrapper *self)
-{
- ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice;
- return self->Funcs->GetLatency(device);
-}
-
typedef struct CaptureWrapper {
DERIVE_FROM_TYPE(ALCbackend);
@@ -143,13 +137,12 @@ static ALCboolean CaptureWrapper_start(CaptureWrapper *self);
static void CaptureWrapper_stop(CaptureWrapper *self);
static ALCenum CaptureWrapper_captureSamples(CaptureWrapper *self, void *buffer, ALCuint samples);
static ALCuint CaptureWrapper_availableSamples(CaptureWrapper *self);
-static ALint64 CaptureWrapper_getLatency(CaptureWrapper *self);
+static DECLARE_FORWARD(CaptureWrapper, ALCbackend, ALint64, getLatency)
static DECLARE_FORWARD(CaptureWrapper, ALCbackend, void, lock)
static DECLARE_FORWARD(CaptureWrapper, ALCbackend, void, unlock)
DECLARE_DEFAULT_ALLOCATORS(CaptureWrapper)
DEFINE_ALCBACKEND_VTABLE(CaptureWrapper);
-
static void CaptureWrapper_Construct(CaptureWrapper *self, ALCdevice *device, const BackendFuncs *funcs)
{
ALCbackend_Construct(STATIC_CAST(ALCbackend, self), device);
@@ -195,12 +188,6 @@ static ALCuint CaptureWrapper_availableSamples(CaptureWrapper *self)
return self->Funcs->AvailableSamples(device);
}
-static ALint64 CaptureWrapper_getLatency(CaptureWrapper *self)
-{
- ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice;
- return self->Funcs->GetLatency(device);
-}
-
ALCbackend *create_backend_wrapper(ALCdevice *device, const BackendFuncs *funcs, ALCbackend_Type type)
{
diff --git a/Alc/backends/coreaudio.c b/Alc/backends/coreaudio.c
index 59198b84..d7cc6e9c 100644
--- a/Alc/backends/coreaudio.c
+++ b/Alc/backends/coreaudio.c
@@ -684,8 +684,7 @@ static const BackendFuncs ca_funcs = {
ca_start_capture,
ca_stop_capture,
ca_capture_samples,
- ca_available_samples,
- ALCdevice_GetLatencyDefault
+ ca_available_samples
};
ALCboolean alc_ca_init(BackendFuncs *func_list)
diff --git a/Alc/backends/opensl.c b/Alc/backends/opensl.c
index 220e6e5c..2547f4b4 100644
--- a/Alc/backends/opensl.c
+++ b/Alc/backends/opensl.c
@@ -396,8 +396,7 @@ static const BackendFuncs opensl_funcs = {
NULL,
NULL,
NULL,
- NULL,
- ALCdevice_GetLatencyDefault
+ NULL
};
diff --git a/Alc/backends/portaudio.c b/Alc/backends/portaudio.c
index cc38cf3a..7c0cf4a6 100644
--- a/Alc/backends/portaudio.c
+++ b/Alc/backends/portaudio.c
@@ -429,8 +429,7 @@ static const BackendFuncs pa_funcs = {
pa_start_capture,
pa_stop_capture,
pa_capture_samples,
- pa_available_samples,
- ALCdevice_GetLatencyDefault
+ pa_available_samples
};
ALCboolean alc_pa_init(BackendFuncs *func_list)
diff --git a/Alc/backends/qsa.c b/Alc/backends/qsa.c
index e591b10a..aca2d73c 100644
--- a/Alc/backends/qsa.c
+++ b/Alc/backends/qsa.c
@@ -1073,16 +1073,7 @@ static ALCenum qsa_capture_samples(ALCdevice *device, ALCvoid *buffer, ALCuint s
return ALC_NO_ERROR;
}
-static ALint64 qsa_get_latency(ALCdevice* device)
-{
- ALint frame_size=FrameSizeFromDevFmt(device->FmtChans, device->FmtType);
-
- return (ALint64)(device->UpdateSize*device->NumUpdates/frame_size)*
- 1000000000/device->Frequency;
-}
-
-BackendFuncs qsa_funcs=
-{
+static const BackendFuncs qsa_funcs= {
qsa_open_playback,
qsa_close_playback,
qsa_reset_playback,
@@ -1093,8 +1084,7 @@ BackendFuncs qsa_funcs=
qsa_start_capture,
qsa_stop_capture,
qsa_capture_samples,
- qsa_available_samples,
- qsa_get_latency,
+ qsa_available_samples
};
ALCboolean alc_qsa_init(BackendFuncs* func_list)
diff --git a/Alc/backends/sndio.c b/Alc/backends/sndio.c
index e79808c3..52bff13a 100644
--- a/Alc/backends/sndio.c
+++ b/Alc/backends/sndio.c
@@ -266,8 +266,7 @@ static const BackendFuncs sndio_funcs = {
NULL,
NULL,
NULL,
- NULL,
- ALCdevice_GetLatencyDefault
+ NULL
};
ALCboolean alc_sndio_init(BackendFuncs *func_list)
diff --git a/Alc/backends/solaris.c b/Alc/backends/solaris.c
index 5d51d460..6fe6449a 100644
--- a/Alc/backends/solaris.c
+++ b/Alc/backends/solaris.c
@@ -252,8 +252,7 @@ static const BackendFuncs solaris_funcs = {
NULL,
NULL,
NULL,
- NULL,
- ALCdevice_GetLatencyDefault
+ NULL
};
ALCboolean alc_solaris_init(BackendFuncs *func_list)
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 583350b9..3089763f 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -469,8 +469,6 @@ typedef struct {
void (*StopCapture)(ALCdevice*);
ALCenum (*CaptureSamples)(ALCdevice*, void*, ALCuint);
ALCuint (*AvailableSamples)(ALCdevice*);
-
- ALint64 (*GetLatency)(ALCdevice*);
} BackendFuncs;
ALCboolean alc_solaris_init(BackendFuncs *func_list);
@@ -762,8 +760,6 @@ void ALCcontext_DecRef(ALCcontext *context);
void AppendAllDevicesList(const ALCchar *name);
void AppendCaptureDeviceList(const ALCchar *name);
-ALint64 ALCdevice_GetLatencyDefault(ALCdevice *device);
-
void ALCdevice_Lock(ALCdevice *device);
void ALCdevice_Unlock(ALCdevice *device);
ALint64 ALCdevice_GetLatency(ALCdevice *device);