mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +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)
|
if (!tracklist || !mus_enabled || !playing)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (cd_sfx) {
|
if (cd_channel) {
|
||||||
cd_sfx->close (cd_sfx);
|
cd_channel->master_vol = 0;
|
||||||
cd_channel->sfx = NULL;
|
cd_channel->leftvol = cd_channel->rightvol = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
wasPlaying = playing;
|
wasPlaying = playing;
|
||||||
playing = false;
|
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.
|
/* start playing, if we've got a trackmap.
|
||||||
* cry if we can't find a file to play */
|
* cry if we can't find a file to play */
|
||||||
static void
|
static void
|
||||||
|
@ -255,17 +267,6 @@ I_OGGMus_Play (int track, qboolean looping)
|
||||||
current_track = track;
|
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. */
|
/* print out the current track map, in numerical order. */
|
||||||
static void
|
static void
|
||||||
I_OGGMus_Info (void)
|
I_OGGMus_Info (void)
|
||||||
|
|
Loading…
Reference in a new issue