aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/backends/base.c10
-rw-r--r--Alc/backends/base.h9
-rw-r--r--Alc/backends/null.c10
3 files changed, 29 insertions, 0 deletions
diff --git a/Alc/backends/base.c b/Alc/backends/base.c
index 70f7a181..8837b0c8 100644
--- a/Alc/backends/base.c
+++ b/Alc/backends/base.c
@@ -82,6 +82,16 @@ static void BackendWrapper_stop(BackendWrapper *self)
device->Funcs->StopPlayback(device);
}
+ALCenum BackendWrapper_captureSamples(BackendWrapper* UNUSED(self), void* UNUSED(buffer), ALCuint UNUSED(samples))
+{
+ return ALC_INVALID_VALUE;
+}
+
+ALCuint BackendWrapper_availableSamples(BackendWrapper* UNUSED(self))
+{
+ return 0;
+}
+
static ALint64 BackendWrapper_getLatency(BackendWrapper *self)
{
ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice;
diff --git a/Alc/backends/base.h b/Alc/backends/base.h
index a118c82e..9ba33097 100644
--- a/Alc/backends/base.h
+++ b/Alc/backends/base.h
@@ -31,6 +31,9 @@ struct ALCbackendVtable {
ALCboolean (*start)(ALCbackend*);
void (*stop)(ALCbackend*);
+ ALCenum (*captureSamples)(ALCbackend*, void*, ALCuint);
+ ALCuint (*availableSamples)(ALCbackend*);
+
ALint64 (*getLatency)(ALCbackend*);
void (*lock)(ALCbackend*);
@@ -52,6 +55,10 @@ static ALCboolean T##_ALCbackend_start(ALCbackend *obj) \
{ return T##_start(STATIC_UPCAST(T, ALCbackend, obj)); } \
static void T##_ALCbackend_stop(ALCbackend *obj) \
{ T##_stop(STATIC_UPCAST(T, ALCbackend, obj)); } \
+static ALCenum T##_ALCbackend_captureSamples(ALCbackend *obj, void *a, ALCuint b) \
+{ return T##_captureSamples(STATIC_UPCAST(T, ALCbackend, obj), a, b); } \
+static ALCuint T##_ALCbackend_availableSamples(ALCbackend *obj) \
+{ return T##_availableSamples(STATIC_UPCAST(T, ALCbackend, obj)); } \
static ALint64 T##_ALCbackend_getLatency(ALCbackend *obj) \
{ return T##_getLatency(STATIC_UPCAST(T, ALCbackend, obj)); } \
static void T##_ALCbackend_lock(ALCbackend *obj) \
@@ -69,6 +76,8 @@ static const struct ALCbackendVtable T##_ALCbackend_vtable = { \
T##_ALCbackend_reset, \
T##_ALCbackend_start, \
T##_ALCbackend_stop, \
+ T##_ALCbackend_captureSamples, \
+ T##_ALCbackend_availableSamples, \
T##_ALCbackend_getLatency, \
T##_ALCbackend_lock, \
T##_ALCbackend_unlock, \
diff --git a/Alc/backends/null.c b/Alc/backends/null.c
index ecf827a9..ab371747 100644
--- a/Alc/backends/null.c
+++ b/Alc/backends/null.c
@@ -140,6 +140,16 @@ static void ALCnullBackend_stop(ALCnullBackend *self)
self->killNow = 0;
}
+ALCenum ALCnullBackend_captureSamples(ALCnullBackend* UNUSED(self), void* UNUSED(buffer), ALCuint UNUSED(samples))
+{
+ return ALC_INVALID_VALUE;
+}
+
+ALCuint ALCnullBackend_availableSamples(ALCnullBackend* UNUSED(self))
+{
+ return 0;
+}
+
static ALint64 ALCnullBackend_getLatency(ALCnullBackend *self)
{
return ALCbackend_getLatency(STATIC_CAST(ALCbackend, self));