diff --git a/src/p_setup.c b/src/p_setup.c index f504ffb5..0a97bef0 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -185,7 +185,7 @@ static void P_ClearSingleMapHeaderInfo(INT16 i) mapheaderinfo[num]->musname[6] = 0; DEH_WriteUndoline("MUSICTRACK", va("%d", mapheaderinfo[num]->mustrack), UNDO_NONE); mapheaderinfo[num]->mustrack = 0; - DEH_WriteUndoline("MUSICPOS", va("%d", mapheaderinfo[num]->mustrack), UNDO_NONE); + DEH_WriteUndoline("MUSICPOS", va("%d", mapheaderinfo[num]->muspos), UNDO_NONE); mapheaderinfo[num]->muspos = 0; DEH_WriteUndoline("FORCECHARACTER", va("%d", mapheaderinfo[num]->forcecharacter), UNDO_NONE); mapheaderinfo[num]->forcecharacter[0] = '\0'; diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index fbd58732..644a667b 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -519,6 +519,10 @@ static void do_fading_callback() static void count_music_bytes(int chan, void *stream, int len, void *udata) { + (void)chan; + (void)stream; + (void)udata; + if (!music || I_SongType() == MU_GME || I_SongType() == MU_MOD || I_SongType() == MU_MID) return; music_bytes += len; @@ -538,6 +542,8 @@ static void music_loop(void) static UINT32 music_fade(UINT32 interval, void *param) { + (void)param; + if (!is_fading || internal_volume == fading_target || fading_duration == 0) @@ -885,6 +891,7 @@ boolean I_LoadSong(char *data, size_t len) ) I_UnloadSong(); + // always do this whether or not a music already exists var_cleanup(); #ifdef HAVE_LIBGME