diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index f13aaef5d660f7e626f3e9c4c522b007fa6abd2d..801294204a883beb44a27bae6389a7cb03138c5a 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -95,7 +95,6 @@ UINT8 sound_started = false; static Mix_Music *music; static UINT8 music_volume, sfx_volume, internal_volume; static float loop_point; -static float song_length; // length in seconds static boolean songpaused; static UINT32 music_bytes; static boolean is_looping; @@ -203,7 +202,7 @@ consvar_t cv_miditimiditypath = CVAR_INIT ("midisoundbank", "./timidity", CV_SAV static void var_cleanup(void) { - song_length = loop_point = 0.0f; + loop_point = 0.0f; music_bytes = fading_source = fading_target =\ fading_timer = fading_duration = 0; @@ -936,12 +935,7 @@ UINT32 I_GetSongLength(void) if (xlength >= 0) return (UINT32)(xlength*1000); #endif - // VERY IMPORTANT to set your LENGTHMS= in your song files, folks! - // SDL mixer can't read music length itself. - length = (UINT32)(song_length*1000); - if (!length) - CONS_Debug(DBG_DETAILED, "Getting music length: music is missing LENGTHMS= tag. Needed for seeking.\n"); - return length; + return 0; //used to check for LENGTHMS, but that's now gone } } @@ -1235,7 +1229,6 @@ boolean I_LoadSong(char *data, size_t len) // Find the OGG loop point. loop_point = 0.0f; - song_length = 0.0f; while ((UINT32)(p - data) < len) { @@ -1326,9 +1319,6 @@ boolean I_PlaySong(boolean looping) if (!music) return false; - if (fpclassify(song_length) == FP_ZERO && (I_SongType() == MU_OGG || I_SongType() == MU_MP3 || I_SongType() == MU_FLAC)) - CONS_Debug(DBG_DETAILED, "This song is missing a LENGTHMS= tag! Required to make seeking work properly.\n"); - if (I_SongType() != MU_MOD && I_SongType() != MU_MID && Mix_PlayMusic(music, 0) == -1) { CONS_Alert(CONS_ERROR, "Mix_PlayMusic: %s\n", Mix_GetError());