removed the cdplayer facility added in 0.85.3

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@394 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2011-01-12 10:02:16 +00:00
parent 724459d6ba
commit 42dc385737
2 changed files with 9 additions and 79 deletions

View file

@ -158,40 +158,6 @@ void CDAudio_Stop(void)
endOfTrack = -1.0;
}
static void CDAudio_Next(void)
{
byte track;
if (!cd_handle || !enabled)
return;
if (!playing)
return;
track = playTrack + 1; /* cd_handle->track[cd_handle->cur_track].id + 1; */
if (track > cd_handle->numtracks)
track = 1;
CDAudio_Play (track, playLooping);
}
static void CDAudio_Prev(void)
{
byte track;
if (!cd_handle || !enabled)
return;
if (!playing)
return;
track = playTrack - 1;
if (track < 1)
track = cd_handle->numtracks;
CDAudio_Play (track, playLooping);
}
void CDAudio_Pause(void)
{
if (!cd_handle || !enabled)
@ -228,15 +194,15 @@ void CDAudio_Resume(void)
static void CD_f (void)
{
const char *command,*arg2;
const char *command;
int ret, n;
if (Cmd_Argc() < 2)
{
Con_Printf("commands:\n");
Con_Printf(" on, off, reset, remap, \n");
Con_Printf(" play, stop, next, prev, loop,\n");
Con_Printf(" pause, resume, eject, info\n");
Con_Printf("commands:");
Con_Printf("on, off, reset, remap, \n");
Con_Printf("play, stop, loop, pause, resume\n");
Con_Printf("eject, info\n");
return;
}
@ -294,21 +260,13 @@ static void CD_f (void)
if (Q_strcasecmp(command, "play") == 0)
{
arg2 = Cmd_Argv (2);
if (*arg2)
CDAudio_Play((byte)atoi(Cmd_Argv (2)), false);
else
CDAudio_Play((byte)1, false);
CDAudio_Play((byte)atoi(Cmd_Argv (2)), false);
return;
}
if (Q_strcasecmp(command, "loop") == 0)
{
arg2 = Cmd_Argv (2);
if (*arg2)
CDAudio_Play((byte)atoi(Cmd_Argv (2)), true);
else
CDAudio_Play((byte)1, true);
CDAudio_Play((byte)atoi(Cmd_Argv (2)), true);
return;
}
@ -330,18 +288,6 @@ static void CD_f (void)
return;
}
if (Q_strcasecmp(command, "next") == 0)
{
CDAudio_Next();
return;
}
if (Q_strcasecmp(command, "prev") == 0)
{
CDAudio_Prev();
return;
}
if (Q_strcasecmp(command, "eject") == 0)
{
if (playing)
@ -377,7 +323,6 @@ static void CD_f (void)
return;
}
Con_Printf ("cd: no such command. Use \"cd\" for help.\n");
}
static qboolean CD_GetVolume (void *unused)
@ -434,13 +379,10 @@ void CDAudio_Update(void)
curstat = SDL_CDStatus(cd_handle);
if (curstat != CD_PLAYING && curstat != CD_PAUSED)
{
playing = false;
endOfTrack = -1.0;
if (playLooping) {
playing = false;
if (playLooping)
CDAudio_Play(playTrack, true);
}
else
CDAudio_Next();
}
}
}

View file

@ -864,13 +864,6 @@ void Host_Init (quakeparms_t *parms)
// note: two leading newlines because the command buffer swallows one of them.
Cbuf_AddText ("\n\nvid_unlock\n");
}
else if (COM_CheckParm ("-cd"))
{
// Allow "qs -dedicated -cd" to work as a standalone cd player ;>
// Useful, because of ubiquitous nature of SDL
S_Init ();
CDAudio_Init ();
}
Hunk_AllocName (0, "-HOST_HUNKLEVEL-");
host_hunklevel = Hunk_LowMark ();
@ -926,11 +919,6 @@ void Host_Shutdown(void)
IN_Shutdown (); // input is only initialized in Host_Init if we're not dedicated -- kristian
VID_Shutdown();
}
else if (COM_CheckParm ("-cd"))
{
CDAudio_Shutdown ();
S_Shutdown ();
}
LOG_Close ();
}