diff options
Diffstat (limited to 'al')
-rw-r--r-- | al/source.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/al/source.cpp b/al/source.cpp index f49d0a20..cba33862 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -405,7 +405,7 @@ al::optional<VoicePos> GetSampleOffset(al::deque<ALbufferQueueItem> &BufferList, BufferFmt = item.mBuffer; if(BufferFmt) break; } - if(!BufferFmt || BufferFmt->mCallback) + if(!BufferFmt) UNLIKELY return al::nullopt; /* Get sample frame offset */ @@ -456,6 +456,9 @@ al::optional<VoicePos> GetSampleOffset(al::deque<ALbufferQueueItem> &BufferList, return VoicePos{static_cast<int>(offset), frac, &BufferList.front()}; } + if(BufferFmt->mCallback) + return al::nullopt; + int64_t totalBufferLen{0}; for(auto &item : BufferList) { |