mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-27 06:34:11 +00:00
implement pause properly. works for me, hopefully for others
This commit is contained in:
parent
9038ae2be9
commit
6b2d5b6d64
1 changed files with 15 additions and 14 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue