diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-06-04 02:51:54 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-06-04 02:51:54 +0000 |
commit | 630d33b234dc116ca175c847abf4ca38e64d52fe (patch) | |
tree | 4929ccaf4efa5f1b82b13792d6cc3fe24420062b /src/volume.c | |
parent | f958e0a4c5bb7241b2ec443a402d10c29abfc08f (diff) | |
download | mpd-630d33b234dc116ca175c847abf4ca38e64d52fe.tar.gz mpd-630d33b234dc116ca175c847abf4ca38e64d52fe.tar.xz mpd-630d33b234dc116ca175c847abf4ca38e64d52fe.zip |
finish ack error codes
git-svn-id: https://svn.musicpd.org/mpd/trunk@1325 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/volume.c')
-rw-r--r-- | src/volume.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/volume.c b/src/volume.c index bf367ab75..42f72ba48 100644 --- a/src/volume.c +++ b/src/volume.c @@ -144,7 +144,8 @@ int changeOssVolumeLevel(FILE * fp, int change, int rel) { if (rel) { if((current = getOssVolumeLevel()) < 0) { - commandError(fp, "problem getting current volume"); + commandError(fp, ACK_ERROR_SYSTEM, + "problem getting current volume"); return -1; } @@ -158,7 +159,7 @@ int changeOssVolumeLevel(FILE * fp, int change, int rel) { level = (new << 8) + new; if(ioctl(volume_ossFd,MIXER_WRITE(volume_ossControl),&level) < 0) { - commandError(fp, "problems setting volume"); + commandError(fp, ACK_ERROR_SYSTEM, "problems setting volume"); return -1; } @@ -270,7 +271,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) { - commandError(fp, "problems getting volume"); + commandError(fp, ACK_ERROR_SYSTEM, "problems getting volume"); ERROR("problems getting alsa volume: %s\n",snd_strerror(err)); return -1; } @@ -296,7 +297,7 @@ int changeAlsaVolumeLevel(FILE * fp, int change, int rel) { if((err = snd_mixer_selem_set_playback_volume_all( volume_alsaElem,level))<0) { - commandError(fp, "problems setting volume"); + commandError(fp, ACK_ERROR_SYSTEM, "problems setting volume"); ERROR("problems setting alsa volume: %s\n",snd_strerror(err)); return -1; } @@ -423,8 +424,8 @@ int changeVolumeLevel(FILE * fp, int change, int rel) { case VOLUME_MIXER_TYPE_SOFTWARE: return changeSoftwareVolume(fp,change,rel); default: - commandError(fp, "no volume support"); - return -1; + return 0; + break; } } /* vim:set shiftwidth=4 tabstop=8 expandtab: */ |