- if ( ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1 )
- {
- Con_DPrintf("ioctl cdromplaytrkind failed\n");
- return;
- }
-
- if ( ioctl(cdfile, CDROMRESUME) == -1 )
- Con_DPrintf("ioctl cdromresume failed\n");
-
- playLooping = looping;
- playTrack = track;
- playing = true;
-
- if (cdvolume == 0.0)
- CDAudio_Pause ();
-}
-
-
-void CDAudio_Stop(void)
-{
- if (cdfile == -1 || !enabled)
- return;
-
- if (!playing)
- return;
-
- if ( ioctl(cdfile, CDROMSTOP) == -1 )
- Con_DPrintf("ioctl cdromstop failed (%d)\n", errno);
-
- wasPlaying = false;
- playing = false;
-}
-
-void CDAudio_Pause(void)
-{
- if (cdfile == -1 || !enabled)
- return;
-
- if (!playing)
- return;
-
- if ( ioctl(cdfile, CDROMPAUSE) == -1 )
- Con_DPrintf("ioctl cdrompause failed\n");
-
- wasPlaying = playing;
- playing = false;
-}
-
-
-void CDAudio_Resume(void)
-{
- if (cdfile == -1 || !enabled)
- return;
-
- if (!cdValid)
- return;
-
- if (!wasPlaying)
- return;
-
- if ( ioctl(cdfile, CDROMRESUME) == -1 )
- Con_DPrintf("ioctl cdromresume failed\n");
- playing = true;
-}
-
-static void CD_f (void)
-{
- char *command;
- int ret;
- int n;
-
- if (Cmd_Argc() < 2)
- return;
-
- command = Cmd_Argv (1);
-
- if (Q_strcasecmp(command, "on") == 0)