move the xmms command from cd.c to cd_xmms.c and have the cd command always

available
This commit is contained in:
Bill Currie 2001-10-05 19:52:56 +00:00
parent 43ab73fd81
commit 44fc52bbb6
2 changed files with 14 additions and 16 deletions

View file

@ -97,21 +97,6 @@ CDAudio_Init (void)
return -1; return -1;
} }
cdmodule->functions->general->p_Init (); cdmodule->functions->general->p_Init ();
#ifdef HAVE_XMMS
Cmd_AddCommand (
"xmms", CD_f, "Control the XMMS player.\n"
"Commands:\n"
"resume - Will resume playback after pause.\n"
"off - Stops control and playback of XMMS.\n"
"on - Starts XMMS if not running, or enables playback.\n"
"pause - Pause the XMMS playback.\n"
"play - Begins playing tracks according to the playlist.\n"
"stop - Stops the currently playing track.\n"
"next - Plays the next track in the playlist.\n"
"prev - Plays the previous track in the playlist.\n"
"shuffle - Toggle shuffling the playlist.\n"
"repeat - Toggle repeating of the playlist.");
#else
Cmd_AddCommand ( Cmd_AddCommand (
"cd", CD_f, "Control the CD player.\n" "cd", CD_f, "Control the CD player.\n"
"Commands:\n" "Commands:\n"
@ -126,7 +111,6 @@ CDAudio_Init (void)
"pause - Pause the CD playback.\n" "pause - Pause the CD playback.\n"
"play (track number) - Plays the specified track one time.\n" "play (track number) - Plays the specified track one time.\n"
"stop - Stops the currently playing track."); "stop - Stops the currently playing track.");
#endif
Sys_Printf ("CD Audio Initialized\n"); Sys_Printf ("CD Audio Initialized\n");
return 0; // FIXME: Assumes success return 0; // FIXME: Assumes success
} }

View file

@ -95,6 +95,7 @@ static qboolean musEnabled = true;
extern int net_socket; extern int net_socket;
static void I_XMMS_f (void);
/* static float cdvolume; */ /* static float cdvolume; */
@ -262,6 +263,19 @@ I_XMMS_Init (void)
{ {
xmms_args[0] = xmms_arg; xmms_args[0] = xmms_arg;
I_XMMS_Running(); I_XMMS_Running();
Cmd_AddCommand (
"xmms", I_XMMS_f, "Control the XMMS player.\n"
"Commands:\n"
"resume - Will resume playback after pause.\n"
"off - Stops control and playback of XMMS.\n"
"on - Starts XMMS if not running, or enables playback.\n"
"pause - Pause the XMMS playback.\n"
"play - Begins playing tracks according to the playlist.\n"
"stop - Stops the currently playing track.\n"
"next - Plays the next track in the playlist.\n"
"prev - Plays the previous track in the playlist.\n"
"shuffle - Toggle shuffling the playlist.\n"
"repeat - Toggle repeating of the playlist.");
return; return;
} }