- [FIX] El fade out are te en compte el volumen inicial

This commit is contained in:
2025-06-25 07:41:48 +02:00
parent d8eb90df1a
commit b03ff65c4c

View File

@@ -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));
}
}