From 34e0da4a00f733d3ed06d36e4311d11624fbee94 Mon Sep 17 00:00:00 2001 From: PJB3005 Date: Thu, 19 Mar 2026 20:06:02 +0100 Subject: [PATCH] Skip work in ReadChannelSamples if no new samples needed --- src/dusk/audio/DuskDsp.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dusk/audio/DuskDsp.cpp b/src/dusk/audio/DuskDsp.cpp index 730a5fb856..61d9abc92f 100644 --- a/src/dusk/audio/DuskDsp.cpp +++ b/src/dusk/audio/DuskDsp.cpp @@ -167,6 +167,10 @@ static void SDLCALL ReadChannelSamples( int additional_amount, int) { + if (additional_amount == 0) { + return; + } + const auto index = static_cast(reinterpret_cast(userdata)); auto& channel = JASDsp::CH_BUF[index]; auto& aux = ChannelAux[index];