mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-18 10:31:42 +00:00
# Conflicts: # src/sdl12/mixer_sound.c
This commit is contained in:
parent
11c6148d4b
commit
e0ab8c1ed0
1 changed files with 13 additions and 8 deletions
|
@ -438,6 +438,13 @@ void I_SetSfxVolume(UINT8 volume)
|
|||
// Music
|
||||
//
|
||||
|
||||
static void count_music_bytes(int chan, void *stream, int len, void *udata)
|
||||
{
|
||||
if(midimode || !music)
|
||||
return;
|
||||
music_bytes += len;
|
||||
}
|
||||
|
||||
// Music hooks
|
||||
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)
|
||||
}
|
||||
else
|
||||
music_bytes = 0;
|
||||
}
|
||||
|
||||
static void count_music_bytes(int chan, void *stream, int len, void *udata)
|
||||
{
|
||||
if(midimode || !music)
|
||||
return;
|
||||
music_bytes += len;
|
||||
{
|
||||
Mix_UnregisterEffect(MIX_CHANNEL_POST, count_music_bytes);
|
||||
music_bytes = 0;
|
||||
// be consistent with FMOD, otherwise I'd prefer to freeze music_bytes
|
||||
// since the other flags indicate music is still playing.
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBGME
|
||||
|
|
Loading…
Reference in a new issue