diff --git a/src/i_sound.h b/src/i_sound.h index 675eecff5..2e526fb4c 100644 --- a/src/i_sound.h +++ b/src/i_sound.h @@ -158,8 +158,6 @@ UINT32 I_GetSongLoopPoint(void); boolean I_SetSongPosition(UINT32 position); UINT32 I_GetSongPosition(void); -void I_UpdateSongLagThreshold (void); - /// ------------------------ // MUSIC PLAYBACK /// ------------------------ diff --git a/src/m_menudefs.c b/src/m_menudefs.c index fa5e66cfe..813cb9817 100644 --- a/src/m_menudefs.c +++ b/src/m_menudefs.c @@ -2182,9 +2182,6 @@ static menuitem_t OP_AdvancedBirdMenu[] = {IT_STRING | IT_CVAR, NULL, "Fade Back from Grow", &cv_growmusicfade, 20}, {IT_STRING | IT_CVAR, NULL, "Fade Out Before Respawning", &cv_respawnfademusicout, 30}, {IT_STRING | IT_CVAR, NULL, "Fade Back In While Respawning", &cv_respawnfademusicback, 40}, - - {IT_STRING | IT_CVAR, NULL, "Resync Threshold", &cv_music_resync_threshold, 60}, - {IT_STRING | IT_CVAR, NULL, "Resync Special Music Only", &cv_music_resync_powerups_only, 70}, }; static const char* OP_AdvancedBirdTooltips[] = @@ -2194,8 +2191,6 @@ static const char* OP_AdvancedBirdTooltips[] = "Fade in music after Grow.", "Fade out music before respawning.", "Fade in music while respawning.", - "Threshold for syncing music.", - "Only sync special music.", }; enum @@ -2205,8 +2200,6 @@ enum fadegrow, respawnfadeout, respawnfadein, - syncthreshold, - syncspecialonly, }; menuitem_t OP_CustomCvarMenu[MAXMENUCCVARS]; diff --git a/src/s_sound.c b/src/s_sound.c index cafbb571b..8e9ff6efb 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -94,14 +94,6 @@ consvar_t cv_playsoundifunfocused = {"playsoundsifunfocused", "No", CV_SAVE, CV_ consvar_t cv_pausemusic = {"playmusicifpaused", "No", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL}; //bird music stuff -static CV_PossibleValue_t music_resync_threshold_cons_t[] = { - {0, "MIN"}, - {1000, "MAX"}, - {0} -}; -consvar_t cv_music_resync_threshold = {"music_resync_threshold", "0", CV_SAVE|CV_CALL, music_resync_threshold_cons_t, I_UpdateSongLagThreshold, 0, NULL, NULL, 0, 0, NULL}; -consvar_t cv_music_resync_powerups_only = {"music_resync_powerups_only", "No", CV_SAVE|CV_CALL, CV_YesNo, I_UpdateSongLagThreshold, 0, NULL, NULL, 0, 0, NULL}; - consvar_t cv_invincmusicfade = {"invincmusicfade", "300", CV_SAVE, CV_Unsigned, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_growmusicfade = {"growmusicfade", "500", CV_SAVE, CV_Unsigned, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_respawnfademusicout = {"respawnfademusicout", "1000", CV_SAVE, CV_Unsigned, NULL, 0, NULL, NULL, 0, 0, NULL}; @@ -288,9 +280,6 @@ void S_RegisterSoundStuff(void) CV_RegisterVar(&cv_playsoundifunfocused); CV_RegisterVar(&cv_pausemusic); - CV_RegisterVar(&cv_music_resync_threshold); - CV_RegisterVar(&cv_music_resync_powerups_only); - CV_RegisterVar(&cv_invincmusicfade); CV_RegisterVar(&cv_growmusicfade); @@ -1717,8 +1706,6 @@ static boolean S_PlayMusic(boolean looping, UINT32 fadeinms) if (S_MusicDisabled()) return false; - I_UpdateSongLagThreshold(); - if ((!fadeinms && !I_PlaySong(looping)) || (fadeinms && !I_FadeInPlaySong(fadeinms, looping))) { diff --git a/src/s_sound.h b/src/s_sound.h index 61260de6a..2bd61af40 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -57,9 +57,6 @@ extern consvar_t cv_amigatype; boolean S_MapMusPlaying(void); //bird music stuff -extern consvar_t cv_music_resync_threshold; -extern consvar_t cv_music_resync_powerups_only; - extern consvar_t cv_invincmusicfade; extern consvar_t cv_growmusicfade; diff --git a/src/sdl/sdl_sound.c b/src/sdl/sdl_sound.c index 2a8939ebe..ea6aae7b7 100644 --- a/src/sdl/sdl_sound.c +++ b/src/sdl/sdl_sound.c @@ -75,11 +75,6 @@ typedef struct sndlump_s UINT8 sound_started = false; -/*static UINT32 stutter_threshold; -static UINT32 music_end_bytes; -static UINT32 music_bytes; -static UINT32 music_stutter_bytes;*/ - static SDL_AudioDeviceID audio_device; static SDL_AudioStream *audio_stream; static SDL_AudioSpec virtual_spec; // audio spec used internally in the engine @@ -1103,42 +1098,6 @@ void I_ShutdownMusic(void) I_UnloadSong(); } -#if 0 -static void Countstutter(int len) -{ - UINT32 bytes; - - music_bytes += len; - - if (gamestate != GS_LEVEL) - return; - - if (hu_stopped) - { - music_stutter_bytes += len; - } - else if (stutter_threshold) - { - if (music_stutter_bytes >= stutter_threshold) - { - /* - This would be after looping. If we're too near to the start of the - file, subtracting the delta will just underflow. - */ - if (music_stutter_bytes > music_bytes) - { - /* We already know where the end is because we looped. */ - bytes = ( music_end_bytes - ( music_stutter_bytes - music_bytes )); - } - else - bytes = ( music_bytes - music_stutter_bytes ); - - I_SetSongPosition((int)((float)bytes/4/44100.0f*1000)); - } - } -} -#endif - /// ------------------------ /// Music Properties /// ------------------------ @@ -1444,11 +1403,6 @@ static void ResetMusic(void) music_speed = 1.0f; } -void I_UpdateSongLagThreshold(void) -{ - //stutter_threshold = cv_music_resync_powerups_only.value ? 0 : (cv_music_resync_threshold.value/1000.0*(4*44100)); -} - boolean I_LoadSong(char *data, size_t len) { char *p = data;