From 55a39d04771573568aacbc256e26b5e6cb069a67 Mon Sep 17 00:00:00 2001
From: Alexander Batalov <[EMAIL REDACTED]>
Date: Tue, 29 Jul 2025 19:56:08 +0300
Subject: [PATCH] Fix double clamping of precached data
---
src/SDL_mixer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/SDL_mixer.c b/src/SDL_mixer.c
index 4390f575..935e05c1 100644
--- a/src/SDL_mixer.c
+++ b/src/SDL_mixer.c
@@ -1067,6 +1067,8 @@ MIX_Audio *MIX_LoadAudioWithProperties(SDL_PropertiesID props) // lets you spec
if ((audio->precache = SDL_LoadFile_IO(io, &audio->precachelen, false)) == NULL) {
goto failed;
}
+ audio->clamp_offset = -1; // precache is already clamped
+ audio->clamp_length = -1;
}
if (ioclamp) {