aboutsummaryrefslogtreecommitdiffstats
path: root/al
diff options
context:
space:
mode:
authorChris Robinson <chris.kcat@gmail.com>2023-02-18 17:16:00 -0800
committerChris Robinson <chris.kcat@gmail.com>2023-02-18 17:16:00 -0800
commit9f49f6cab06374d6f5a4e1ab63f1532bf79d4cb2 (patch)
treeaf83c2f9eeb4975ff0b5dc6021c4795a98622d6c /al
parent7e00d4a00243e417ff59d3be001e1180ff55b72b (diff)
Track the callback buffer base separately
Instead of recalculating it all the time, even for sources that don't use callback buffers.
Diffstat (limited to 'al')
-rw-r--r--al/source.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/al/source.cpp b/al/source.cpp
index 7db175ef..d3468628 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -539,6 +539,7 @@ void InitVoice(Voice *voice, ALsource *source, ALbufferQueueItem *BufferList, AL
if(buffer->mCallback) voice->mFlags.set(VoiceIsCallback);
else if(source->SourceType == AL_STATIC) voice->mFlags.set(VoiceIsStatic);
voice->mNumCallbackBlocks = 0;
+ voice->mCallbackBlockBase = 0;
voice->prepare(device);