mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Only resync music if in a level
This commit is contained in:
parent
d1dce97d15
commit
e9c0e65e0e
1 changed files with 16 additions and 8 deletions
|
|
@ -564,17 +564,11 @@ static void do_fading_callback(void)
|
||||||
/// Music Hooks
|
/// Music Hooks
|
||||||
/// ------------------------
|
/// ------------------------
|
||||||
|
|
||||||
static void count_music_bytes(int chan, void *stream, int len, void *udata)
|
static void
|
||||||
|
Countstutter (int len)
|
||||||
{
|
{
|
||||||
UINT32 bytes;
|
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)
|
if (hu_stopped)
|
||||||
{
|
{
|
||||||
music_stutter_bytes += len;
|
music_stutter_bytes += len;
|
||||||
|
|
@ -599,6 +593,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)
|
static void music_loop(void)
|
||||||
{
|
{
|
||||||
if (is_looping)
|
if (is_looping)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue