aboutsummaryrefslogtreecommitdiffstats
path: root/al/source.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-01-26 10:40:16 -0800
committerChris Robinson <[email protected]>2021-01-26 10:40:16 -0800
commit3b89246733420f2ca0ac495c710b856f58ee580e (patch)
treeb1ce3a2b3ce2e34ac2fca7039c231fc5394a5216 /al/source.cpp
parentac5d40e40a0155351fe1be4aab30017b6a13a859 (diff)
Make sure InitVoice is given a valid buffer queue item
Diffstat (limited to 'al/source.cpp')
-rw-r--r--al/source.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/al/source.cpp b/al/source.cpp
index e17632f4..7cddb53a 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -352,7 +352,7 @@ double GetSourceOffset(ALsource *Source, ALenum name, ALCcontext *context)
struct VoicePos {
ALuint pos, frac;
- VoiceBufferItem *bufferitem;
+ ALbufferQueueItem *bufferitem;
};
/**
@@ -605,7 +605,7 @@ bool SetVoiceOffset(Voice *oldvoice, const VoicePos &vpos, ALsource *source, ALC
newvoice->mFlags = 0u;
if(vpos.pos > 0 || vpos.frac > 0 || vpos.bufferitem != &source->mQueue.front())
newvoice->mFlags |= VoiceIsFading;
- InitVoice(newvoice, source, &source->mQueue.front(), context, device);
+ InitVoice(newvoice, source, vpos.bufferitem, context, device);
source->VoiceIdx = vidx;
/* Set the old voice as having a pending change, and send it off with the