From 09a3c99c3b609d50eda908f3b09bc13d4ec081d2 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 13 Aug 2025 16:38:44 +1000 Subject: [PATCH] AudioStream: Fix crash with timestretch disabled --- src/util/audio_stream.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/audio_stream.cpp b/src/util/audio_stream.cpp index 42ca4486f..d4faa42fc 100644 --- a/src/util/audio_stream.cpp +++ b/src/util/audio_stream.cpp @@ -900,6 +900,9 @@ void AudioStream::StretchOverrun() void AudioStream::EmptyStretchBuffers() { + if (!IsStretchEnabled()) + return; + m_stretch_reset = STRETCH_RESET_THRESHOLD; // Wipe soundtouch samples. If we don't do this and we're switching from a high tempo to low,