From b03ff65c4c2c7dab2e314bffbd2645d859d974ff Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Wed, 25 Jun 2025 07:41:48 +0200 Subject: [PATCH] - [FIX] El fade out are te en compte el volumen inicial --- jail_audio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jail_audio.cpp b/jail_audio.cpp index 23c3ffe..587b70e 100644 --- a/jail_audio.cpp +++ b/jail_audio.cpp @@ -101,7 +101,7 @@ Uint32 JA_UpdateCallback(void *userdata, SDL_TimerID timerID, Uint32 interval) } else { const int time_passed = time - fade_start_time; const float percent = (float)time_passed / (float)fade_duration; - SDL_SetAudioStreamGain(current_music->stream, 1.0 - percent); + SDL_SetAudioStreamGain(current_music->stream, JA_musicVolume*(1.0 - percent)); } }