aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer/alsa_mixer.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-26 19:46:33 +0100
committerMax Kellermann <max@duempel.org>2009-03-26 19:46:33 +0100
commit1fcf09a816977db8e12e4534d7c4ced5c053f0de (patch)
tree76cc2e953d60c5c8da8b502125770e78ca6fc125 /src/mixer/alsa_mixer.c
parent617a4fd2d2eff45393c4e243129a4648822d5d86 (diff)
downloadmpd-1fcf09a816977db8e12e4534d7c4ced5c053f0de.tar.gz
mpd-1fcf09a816977db8e12e4534d7c4ced5c053f0de.tar.xz
mpd-1fcf09a816977db8e12e4534d7c4ced5c053f0de.zip
mixer_control: close mixer on failure
When getting or setting the volume fails, the MPD core close the mixer. Moved the duplicated code from the mixer plugins.
Diffstat (limited to 'src/mixer/alsa_mixer.c')
-rw-r--r--src/mixer/alsa_mixer.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/mixer/alsa_mixer.c b/src/mixer/alsa_mixer.c
index c5aac13d4..892cef2b4 100644
--- a/src/mixer/alsa_mixer.c
+++ b/src/mixer/alsa_mixer.c
@@ -162,7 +162,6 @@ alsa_mixer_get_volume(struct mixer *mixer)
if (err < 0) {
g_warning("problems getting alsa volume: %s (snd_mixer_%s)\n",
snd_strerror(err), "handle_events");
- alsa_mixer_close(mixer);
return false;
}
@@ -172,7 +171,6 @@ alsa_mixer_get_volume(struct mixer *mixer)
if (err < 0) {
g_warning("problems getting alsa volume: %s (snd_mixer_%s)\n",
snd_strerror(err), "selem_get_playback_volume");
- alsa_mixer_close(mixer);
return false;
}
@@ -216,7 +214,6 @@ alsa_mixer_set_volume(struct mixer *mixer, unsigned volume)
if (err < 0) {
g_warning("problems setting alsa volume: %s\n",
snd_strerror(err));
- alsa_mixer_close(mixer);
return false;
}