diff options
author | Chris Robinson <[email protected]> | 2021-01-26 10:40:16 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-01-26 10:40:16 -0800 |
commit | 3b89246733420f2ca0ac495c710b856f58ee580e (patch) | |
tree | b1ce3a2b3ce2e34ac2fca7039c231fc5394a5216 /al/source.cpp | |
parent | ac5d40e40a0155351fe1be4aab30017b6a13a859 (diff) |
Make sure InitVoice is given a valid buffer queue item
Diffstat (limited to 'al/source.cpp')
-rw-r--r-- | al/source.cpp | 4 |
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 |