diff options
author | Chris Robinson <[email protected]> | 2015-09-21 05:52:01 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2015-09-21 05:52:01 -0700 |
commit | a774408753bebd0a2acf3b0b7d6d24d6e2e43606 (patch) | |
tree | 37bc450d845d4ac71138f0bd1c3b928922851dae /OpenAL32 | |
parent | 5f5eebc4df536daef7f68d02f7a0c751c8dc0f79 (diff) |
Get rid of ALCdevice_GetLatency
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alMain.h | 1 | ||||
-rw-r--r-- | OpenAL32/alSource.c | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 4c91336d..9d76fcd2 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -828,7 +828,6 @@ void AppendCaptureDeviceList(const ALCchar *name); void ALCdevice_Lock(ALCdevice *device); void ALCdevice_Unlock(ALCdevice *device); -ALint64 ALCdevice_GetLatency(ALCdevice *device); void ALCcontext_DeferUpdates(ALCcontext *context); void ALCcontext_ProcessUpdates(ALCcontext *context); diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 239c5380..c48ccfea 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -33,6 +33,8 @@ #include "alThunk.h" #include "alAuxEffectSlot.h" +#include "backends/base.h" + #include "threads.h" @@ -929,6 +931,7 @@ static ALboolean SetSourcei64v(ALsource *Source, ALCcontext *Context, SrcIntProp static ALboolean GetSourcedv(ALsource *Source, ALCcontext *Context, SrcFloatProp prop, ALdouble *values) { + ALCdevice *device = Context->Device; ALbufferlistitem *BufferList; ALdouble offsets[2]; ALdouble updateLen; @@ -1041,7 +1044,7 @@ static ALboolean GetSourcedv(ALsource *Source, ALCcontext *Context, SrcFloatProp ReadLock(&Source->queue_lock); values[0] = GetSourceSecOffset(Source); ReadUnlock(&Source->queue_lock); - values[1] = (ALdouble)ALCdevice_GetLatency(Context->Device) / + values[1] = (ALdouble)(V0(device->Backend,getLatency)()) / 1000000000.0; UnlockContext(Context); return AL_TRUE; @@ -1308,6 +1311,7 @@ static ALboolean GetSourceiv(ALsource *Source, ALCcontext *Context, SrcIntProp p static ALboolean GetSourcei64v(ALsource *Source, ALCcontext *Context, SrcIntProp prop, ALint64 *values) { + ALCdevice *device = Context->Device; ALdouble dvals[6]; ALint ivals[3]; ALboolean err; @@ -1319,7 +1323,7 @@ static ALboolean GetSourcei64v(ALsource *Source, ALCcontext *Context, SrcIntProp ReadLock(&Source->queue_lock); values[0] = GetSourceOffset(Source); ReadUnlock(&Source->queue_lock); - values[1] = ALCdevice_GetLatency(Context->Device); + values[1] = V0(device->Backend,getLatency)(); UnlockContext(Context); return AL_TRUE; |