Only resync music if in a level
This commit is contained in:
1 parent
e27d54f0fa
commit
7f0fa6987a
1 file changed
+16
-8
+16
-8
@@ -547,17 +547,11 @@ static void do_fading_callback(void)
|
||||
/// Music Hooks
|
||||
/// ------------------------
|
||||
|
||||
static void count_music_bytes(int chan, void *stream, int len, void *udata)
|
||||
static void
|
||||
Countstutter (int len)
|
||||
{
|
||||
UINT32 bytes;
|
||||
|
||||
(void)chan;
|
||||
(void)stream;
|
||||
(void)udata;
|
||||
|
||||
if (!music || I_SongType() == MU_GME || I_SongType() == MU_MOD || I_SongType() == MU_MID)
|
||||
return;
|
||||
music_bytes += len;
|
||||
if (hu_stopped)
|
||||
{
|
||||
music_stutter_bytes += len;
|
||||
@@ -582,6 +576,20 @@ static void count_music_bytes(int chan, void *stream, int len, void *udata)
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
if (gamestate == GS_LEVEL)
|
||||
Countstutter(len);
|
||||
}
|
||||
|
||||
static void music_loop(void)
|
||||
{
|
||||
if (is_looping)
|
||||
|
||||
Reference in new issue
Block a user