Another loop fix to resolve music_bytes not resetting on non-looppoint tracks

# Conflicts:
#	src/sdl12/mixer_sound.c
This commit is contained in:
mazmazz 2018-08-15 02:03:04 -04:00
parent 2e9dba352a
commit 79531b9683

View file

@ -723,15 +723,14 @@ boolean I_StartDigSong(const char *musicname, boolean looping)
}
}
if (Mix_PlayMusic(music, looping && loop_point == 0.0f ? -1 : 0) == -1)
if (Mix_PlayMusic(music, 0) == -1)
{
CONS_Alert(CONS_ERROR, "Mix_PlayMusic: %s\n", Mix_GetError());
return true;
}
Mix_VolumeMusic((UINT32)music_volume*128/31);
if (loop_point != 0.0f)
Mix_HookMusicFinished(music_loop);
Mix_HookMusicFinished(music_loop);
music_bytes = 0;
if(!Mix_RegisterEffect(MIX_CHANNEL_POST, count_music_bytes, NULL, NULL))