From 659243baa1302c2937c0568cf91d6de590e8638f Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 12 Oct 2024 19:44:15 +0200 Subject: [PATCH] always assign stutter_threshold --- src/sdl/mixer_sound.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index 2fb3dc621..3f36399b3 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -594,6 +594,9 @@ Countstutter (int len) { UINT32 bytes; + if (!cv_birdmusic.value || gamestate != GS_LEVEL) + return; + if (hu_stopped) { music_stutter_bytes += len; @@ -629,8 +632,7 @@ static void count_music_bytes(int chan, void *stream, int len, void *udata) music_bytes += len; - if (cv_birdmusic.value && gamestate == GS_LEVEL) - Countstutter(len); + Countstutter(len); } static void music_loop(void) @@ -1045,9 +1047,6 @@ UINT32 I_GetSongPosition(void) void I_UpdateSongLagThreshold (void) { - if (!cv_birdmusic.value) - return; - stutter_threshold = cv_music_resync_powerups_only.value ? 0 : (cv_music_resync_threshold.value/1000.0*(4*44100)); }