aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/alsa_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-02-16 01:39:00 +0100
committerMax Kellermann <max@duempel.org>2009-02-16 01:39:00 +0100
commit37bc31d161d486d0499cf64123b7561f57dd0c53 (patch)
tree54cb688aecd4f30f1afbf0f4d87d48a7abbe4fba /src/output/alsa_plugin.c
parent79b50b7d9c2ef84e0b74345a31a9b2f96d2690cd (diff)
downloadmpd-37bc31d161d486d0499cf64123b7561f57dd0c53.tar.gz
mpd-37bc31d161d486d0499cf64123b7561f57dd0c53.tar.xz
mpd-37bc31d161d486d0499cf64123b7561f57dd0c53.zip
output_plugin: replaced method "control()" with "mixer()"
The output plugin shouldn't know any specifics of the mixer API. Make it return the mixer object, and let the caller deal with it.
Diffstat (limited to 'src/output/alsa_plugin.c')
-rw-r--r--src/output/alsa_plugin.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/output/alsa_plugin.c b/src/output/alsa_plugin.c
index c26fcdf05..bbb03e80b 100644
--- a/src/output/alsa_plugin.c
+++ b/src/output/alsa_plugin.c
@@ -156,6 +156,14 @@ alsa_finish(void *data)
alsa_data_free(ad);
}
+static struct mixer *
+alsa_get_mixer(void *data)
+{
+ struct alsa_data *ad = data;
+
+ return ad->mixer;
+}
+
static bool
alsa_test_default_device(void)
{
@@ -465,21 +473,14 @@ alsa_play(void *data, const char *chunk, size_t size)
return true;
}
-static bool
-alsa_control(void *data, int cmd, void *arg)
-{
- struct alsa_data *ad = data;
- return mixer_control(ad->mixer, cmd, arg);
-}
-
const struct audio_output_plugin alsaPlugin = {
.name = "alsa",
.test_default_device = alsa_test_default_device,
.init = alsa_init,
.finish = alsa_finish,
+ .get_mixer = alsa_get_mixer,
.open = alsa_open,
.play = alsa_play,
.cancel = alsa_cancel,
.close = alsa_close,
- .control = alsa_control
};