From 338995ebe0fcd11be3951f0b8e1248ab5896a42c Mon Sep 17 00:00:00 2001 From: doop <56421834+dooplecks@users.noreply.github.com> Date: Thu, 20 Aug 2026 19:18:07 -0400 Subject: [PATCH] Fix interpretation of `needed` in audio callback (#2312) --- src/dusk/audio/DuskAudioSystem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dusk/audio/DuskAudioSystem.cpp b/src/dusk/audio/DuskAudioSystem.cpp index 3577d3c9c7..3fda98a436 100644 --- a/src/dusk/audio/DuskAudioSystem.cpp +++ b/src/dusk/audio/DuskAudioSystem.cpp @@ -35,7 +35,7 @@ static void SDLCALL GetNewAudio( /** * Render an entire new frame of audio and output it to SDL3. * Note: "audio frames" are unrelated to video frames. - * @return Amount of audio samples rendered. + * @return Amount of audio samples rendered in bytes. */ static int RenderNewAudioFrame(); @@ -121,7 +121,7 @@ int RenderNewAudioFrame() { JASAudioThread::snIntCount -= 1; } - return static_cast(countSubframes) * DSP_SUBFRAME_SIZE; + return static_cast(countSubframes) * sizeof(OutputSubframe); } static void InterleaveOutputData(const OutputSubframe& data, std::span target) {