implement pause properly. works for me, hopefully for others

This commit is contained in:
Bill Currie 2004-02-07 06:18:56 +00:00
parent 9038ae2be9
commit 6b2d5b6d64

View file

@ -195,15 +195,27 @@ I_OGGMus_Pause (void)
if (!tracklist || !mus_enabled || !playing)
return;
if (cd_sfx) {
cd_sfx->close (cd_sfx);
cd_channel->sfx = NULL;
if (cd_channel) {
cd_channel->master_vol = 0;
cd_channel->leftvol = cd_channel->rightvol = 0;
}
wasPlaying = playing;
playing = false;
}
/* unpause. might just cheat and restart playing */
static void
I_OGGMus_Resume (void)
{
if (!tracklist || !mus_enabled || !wasPlaying)
return;
set_volume ();
wasPlaying = false;
playing = true;
}
/* start playing, if we've got a trackmap.
* cry if we can't find a file to play */
static void
@ -255,17 +267,6 @@ I_OGGMus_Play (int track, qboolean looping)
current_track = track;
}
/* unpause. might just cheat and restart playing */
static void
I_OGGMus_Resume (void)
{
if (!tracklist || !mus_enabled || !wasPlaying)
return;
I_OGGMus_Play (current_track, true);
playing = true;
}
/* print out the current track map, in numerical order. */
static void
I_OGGMus_Info (void)