mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
# Conflicts: # src/sdl12/mixer_sound.c
This commit is contained in:
parent
afa71ec7cd
commit
b24efc7439
1 changed files with 13 additions and 8 deletions
|
|
@ -438,6 +438,13 @@ void I_SetSfxVolume(UINT8 volume)
|
||||||
// Music
|
// Music
|
||||||
//
|
//
|
||||||
|
|
||||||
|
static void count_music_bytes(int chan, void *stream, int len, void *udata)
|
||||||
|
{
|
||||||
|
if(midimode || !music)
|
||||||
|
return;
|
||||||
|
music_bytes += len;
|
||||||
|
}
|
||||||
|
|
||||||
// Music hooks
|
// Music hooks
|
||||||
static void music_loop(void)
|
static void music_loop(void)
|
||||||
{
|
{
|
||||||
|
|
@ -448,14 +455,12 @@ static void music_loop(void)
|
||||||
music_bytes = loop_point/1000.0L*44100.0L*4; //assume 44.1khz, 4-byte length (see I_GetMusicPosition)
|
music_bytes = loop_point/1000.0L*44100.0L*4; //assume 44.1khz, 4-byte length (see I_GetMusicPosition)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
music_bytes = 0;
|
{
|
||||||
}
|
Mix_UnregisterEffect(MIX_CHANNEL_POST, count_music_bytes);
|
||||||
|
music_bytes = 0;
|
||||||
static void count_music_bytes(int chan, void *stream, int len, void *udata)
|
// be consistent with FMOD, otherwise I'd prefer to freeze music_bytes
|
||||||
{
|
// since the other flags indicate music is still playing.
|
||||||
if(midimode || !music)
|
}
|
||||||
return;
|
|
||||||
music_bytes += len;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBGME
|
#ifdef HAVE_LIBGME
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue