don't depend on libQFcd

This commit is contained in:
Bill Currie 2007-05-31 06:06:52 +00:00 committed by Jeff Teunissen
parent ce2ba56c47
commit 425fed1a63
2 changed files with 12 additions and 12 deletions

View file

@ -236,7 +236,7 @@ I_CDAudio_Play (int track, qboolean looping)
playing = true; playing = true;
if (cdvolume == 0.0) if (cdvolume == 0.0)
CDAudio_Pause (); I_CDAudio_Pause ();
} }
static void static void
@ -327,12 +327,12 @@ I_CD_f (void)
} }
if (strequal (command, "play")) { if (strequal (command, "play")) {
CDAudio_Play (atoi (Cmd_Argv (2)), false); I_CDAudio_Play (atoi (Cmd_Argv (2)), false);
return; return;
} }
if (strequal (command, "loop")) { if (strequal (command, "loop")) {
CDAudio_Play (atoi (Cmd_Argv (2)), true); I_CDAudio_Play (atoi (Cmd_Argv (2)), true);
return; return;
} }
@ -342,12 +342,12 @@ I_CD_f (void)
} }
if (strequal (command, "pause")) { if (strequal (command, "pause")) {
CDAudio_Pause (); I_CDAudio_Pause ();
return; return;
} }
if (strequal (command, "resume")) { if (strequal (command, "resume")) {
CDAudio_Resume (); I_CDAudio_Resume ();
return; return;
} }
@ -385,11 +385,11 @@ I_CDAudio_Update (void)
if (cdvolume) { if (cdvolume) {
Cvar_SetValue (bgmvolume, 0.0); Cvar_SetValue (bgmvolume, 0.0);
cdvolume = bgmvolume->value; cdvolume = bgmvolume->value;
CDAudio_Pause (); I_CDAudio_Pause ();
} else { } else {
Cvar_SetValue (bgmvolume, 1.0); Cvar_SetValue (bgmvolume, 1.0);
cdvolume = bgmvolume->value; cdvolume = bgmvolume->value;
CDAudio_Resume (); I_CDAudio_Resume ();
} }
} }
@ -405,7 +405,7 @@ I_CDAudio_Update (void)
subchnl.cdsc_audiostatus != CDROM_AUDIO_PAUSED) { subchnl.cdsc_audiostatus != CDROM_AUDIO_PAUSED) {
playing = false; playing = false;
if (playLooping) if (playLooping)
CDAudio_Play (playTrack, true); I_CDAudio_Play (playTrack, true);
} }
} }
} }
@ -415,7 +415,7 @@ Mus_CDChange (cvar_t *mus_cdaudio)
{ {
int i; int i;
CDAudio_Shutdown (); I_CDAudio_Shutdown ();
if (strequal (mus_cdaudio->string, "none")) { if (strequal (mus_cdaudio->string, "none")) {
return; return;
} }

View file

@ -171,17 +171,17 @@ I_CDAudio_Update (void)
if (bgmvolume->value != cdvolume) { if (bgmvolume->value != cdvolume) {
if (cdvolume) { if (cdvolume) {
Cvar_SetValue (bgmvolume, 0.0); Cvar_SetValue (bgmvolume, 0.0);
CDAudio_Pause (); I_CDAudio_Pause ();
} else { } else {
Cvar_SetValue (bgmvolume, 1.0); Cvar_SetValue (bgmvolume, 1.0);
CDAudio_Resume (); I_CDAudio_Resume ();
} }
cdvolume = bgmvolume->value; cdvolume = bgmvolume->value;
return; return;
} }
if (playLooping && (SDL_CDStatus (cd_id) != CD_PLAYING) if (playLooping && (SDL_CDStatus (cd_id) != CD_PLAYING)
&& (SDL_CDStatus (cd_id) != CD_PAUSED)) && (SDL_CDStatus (cd_id) != CD_PAUSED))
CDAudio_Play (cd_id->cur_track + 1, true); I_CDAudio_Play (cd_id->cur_track + 1, true);
} }
#define CD_f_DEFINED #define CD_f_DEFINED