aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-09-08 06:59:58 -0700
committerChris Robinson <[email protected]>2014-09-08 06:59:58 -0700
commita234fc11e580ac851bdfabc8711546209c1c11a1 (patch)
tree881c23dcc50ee74b6fda39a516ae08bb22fcd001 /Alc/backends
parent9dacd89a02e94e6d15feac53a9184c0eecd6d06f (diff)
Remove the GetLatency method from the old BackendFuncs
Diffstat (limited to 'Alc/backends')
-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
7 files changed, 9 insertions, 37 deletions
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)