From 3b89246733420f2ca0ac495c710b856f58ee580e Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 26 Jan 2021 10:40:16 -0800 Subject: Make sure InitVoice is given a valid buffer queue item --- al/source.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'al/source.cpp') 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 -- cgit v1.2.3