aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-02-27 01:35:23 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-02-27 01:35:23 +0000
commit9b1c5505973abffe1e3c3ab3ba7f84664fbf161f (patch)
treea4e393b11fce35995d218ccb451c165465c46a54 /src/command.c
parentce1d377d697036886ea13f9a66810bc70b748d90 (diff)
downloadmpd-9b1c5505973abffe1e3c3ab3ba7f84664fbf161f.tar.gz
mpd-9b1c5505973abffe1e3c3ab3ba7f84664fbf161f.tar.xz
mpd-9b1c5505973abffe1e3c3ab3ba7f84664fbf161f.zip
add xfade and audio to status, remove crossfade no args options
git-svn-id: https://svn.musicpd.org/mpd/trunk@75 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/command.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/command.c b/src/command.c
index 9d0fca603..6b26cc918 100644
--- a/src/command.c
+++ b/src/command.c
@@ -29,6 +29,7 @@
#include "list.h"
#include "conf.h"
#include "permission.h"
+#include "audio.h"
#include <stdlib.h>
#include <string.h>
@@ -81,6 +82,8 @@
#define COMMAND_STATUS_TIME "time"
#define COMMAND_STATUS_BITRATE "bitrate"
#define COMMAND_STATUS_ERROR "error"
+#define COMMAND_STATUS_CROSSFADE "xfade"
+#define COMMAND_STATUS_AUDIO "audio"
typedef int (* CommandHandlerFunction)(FILE *, unsigned int *, int, char **);
@@ -186,6 +189,8 @@ int commandStatus(FILE * fp, unsigned int * permission, int argArrayLength,
myfprintf(fp,"%s: %i\n",COMMAND_STATUS_SONG,getPlaylistCurrentSong());
myfprintf(fp,"%s: %i:%i\n",COMMAND_STATUS_TIME,getPlayerElapsedTime(),getPlayerTotalTime());
myfprintf(fp,"%s: %li\n",COMMAND_STATUS_BITRATE,getPlayerBitRate(),getPlayerTotalTime());
+ myfprintf(fp,"%s: %i\n",COMMAND_STATUS_CROSSFADE,(int)getPlayerCrossFade());
+ myfprintf(fp,"%s: %u:%i:%i\n",COMMAND_STATUS_AUDIO,getPlayerSampleRate(),getPlayerBits(),getPlayerChannels());
}
if(getPlayerError()!=PLAYER_ERROR_NOERROR) {
@@ -512,11 +517,6 @@ int handleCrossfade(FILE * fp, unsigned int * permission, int argArrayLength,
int time;
char * test;
- if(argArrayLength==1) {
- myfprintf(fp,"crossfade: %i\n",(int)(getPlayerCrossFade()));
- return 0;
- }
-
time = strtol(argArray[1],&test,10);
if(*test!='\0' || time<0) {
myfprintf(fp,"%s \"%s\" is not a integer >= 0\n",
@@ -567,7 +567,7 @@ void initCommands() {
addCommand(COMMAND_PING ,0, 0, 0,handlePing);
addCommand(COMMAND_SETVOL ,PERMISSION_CONTROL, 1, 1,handleSetVol);
addCommand(COMMAND_PASSWORD ,0, 1, 1,handlePassword);
- addCommand(COMMAND_CROSSFADE ,PERMISSION_CONTROL, 0, 1,handleCrossfade);
+ addCommand(COMMAND_CROSSFADE ,PERMISSION_CONTROL, 1, 1,handleCrossfade);
sortList(commandList);
}