aboutsummaryrefslogtreecommitdiffstats
path: root/src/volume.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-06-04 00:49:33 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-06-04 00:49:33 +0000
commitef6c500edb7dc1a4eb9bff11b83b57dd60d37d4a (patch)
tree26e7b16fbeb8bef1b45a9a7a035d5a3309c0145a /src/volume.c
parentdafe92a9edd35ef805963d30e953bcadd78074d3 (diff)
downloadmpd-ef6c500edb7dc1a4eb9bff11b83b57dd60d37d4a.tar.gz
mpd-ef6c500edb7dc1a4eb9bff11b83b57dd60d37d4a.tar.xz
mpd-ef6c500edb7dc1a4eb9bff11b83b57dd60d37d4a.zip
clean up ACK error coding a little bit
git-svn-id: https://svn.musicpd.org/mpd/trunk@1321 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/volume.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/volume.c b/src/volume.c
index 49d7483cd..bf367ab75 100644
--- a/src/volume.c
+++ b/src/volume.c
@@ -144,8 +144,7 @@ int changeOssVolumeLevel(FILE * fp, int change, int rel) {
if (rel) {
if((current = getOssVolumeLevel()) < 0) {
- myfprintf(fp,"%s problem getting current volume\n",
- COMMAND_RESPOND_ERROR);
+ commandError(fp, "problem getting current volume");
return -1;
}
@@ -159,7 +158,7 @@ int changeOssVolumeLevel(FILE * fp, int change, int rel) {
level = (new << 8) + new;
if(ioctl(volume_ossFd,MIXER_WRITE(volume_ossControl),&level) < 0) {
- myfprintf(fp,"%s problems setting volume\n",COMMAND_RESPOND_ERROR);
+ commandError(fp, "problems setting volume");
return -1;
}
@@ -271,8 +270,7 @@ int changeAlsaVolumeLevel(FILE * fp, int change, int rel) {
if((err = snd_mixer_selem_get_playback_volume(volume_alsaElem,
SND_MIXER_SCHN_FRONT_LEFT,&level))<0) {
- myfprintf(fp,"%s problems getting volume\n",
- COMMAND_RESPOND_ERROR);
+ commandError(fp, "problems getting volume");
ERROR("problems getting alsa volume: %s\n",snd_strerror(err));
return -1;
}
@@ -298,8 +296,7 @@ int changeAlsaVolumeLevel(FILE * fp, int change, int rel) {
if((err = snd_mixer_selem_set_playback_volume_all(
volume_alsaElem,level))<0) {
- myfprintf(fp,"%s problems setting volume\n",
- COMMAND_RESPOND_ERROR);
+ commandError(fp, "problems setting volume");
ERROR("problems setting alsa volume: %s\n",snd_strerror(err));
return -1;
}
@@ -426,7 +423,7 @@ int changeVolumeLevel(FILE * fp, int change, int rel) {
case VOLUME_MIXER_TYPE_SOFTWARE:
return changeSoftwareVolume(fp,change,rel);
default:
- myfprintf(fp,"%s no volume support!\n",COMMAND_RESPOND_ERROR);
+ commandError(fp, "no volume support");
return -1;
}
}