aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-10-28 05:57:07 -0700
committerChris Robinson <[email protected]>2013-10-28 05:57:07 -0700
commitc8603092d314c31e007efd9555967f4b57a7f7f8 (patch)
tree72004389cb2327fd58de5d8cd25ae36f22fc1a34 /Alc
parentf065700ef925048d28d7db3bd4d9225e7aa21cc7 (diff)
Add a default getLatency to ALCbackend
And make sure the backend is properly deleted.
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c7
-rw-r--r--Alc/backends/base.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index d2c28a05..37e3290f 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1453,6 +1453,11 @@ void UnlockContext(ALCcontext *context)
}
+ALint64 ALCbackend_getLatency(ALCbackend* UNUSED(self))
+{
+ return 0;
+}
+
void ALCbackend_lock(ALCbackend *self)
{
ALCdevice_LockDefault(self->mDevice);
@@ -1953,6 +1958,8 @@ static ALCvoid FreeDevice(ALCdevice *device)
VCALL0(device->Backend,close,());
else
ALCdevice_CloseCapture(device);
+ DELETE_OBJ(device->Backend);
+ device->Backend = NULL;
if(device->DefaultSlot)
{
diff --git a/Alc/backends/base.h b/Alc/backends/base.h
index ed690f56..2cde8ccb 100644
--- a/Alc/backends/base.h
+++ b/Alc/backends/base.h
@@ -12,6 +12,7 @@ typedef struct ALCbackend {
ALCdevice *mDevice;
} ALCbackend;
+ALint64 ALCbackend_getLatency(ALCbackend *self);
void ALCbackend_lock(ALCbackend *self);
void ALCbackend_unlock(ALCbackend *self);