aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/oss_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/oss_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 '')
-rw-r--r--src/output/oss_plugin.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/output/oss_plugin.c b/src/output/oss_plugin.c
index c4b4698ee..007d5bc84 100644
--- a/src/output/oss_plugin.c
+++ b/src/output/oss_plugin.c
@@ -410,6 +410,14 @@ static void oss_finishDriver(void *data)
freeOssData(od);
}
+static struct mixer *
+oss_get_mixer(void *data)
+{
+ OssData *od = data;
+
+ return od->mixer;
+}
+
static int setParam(OssData * od, unsigned param, int *value)
{
int val = *value;
@@ -571,21 +579,14 @@ oss_playAudio(void *data, const char *playChunk, size_t size)
return true;
}
-static bool
-oss_control(void *data, int cmd, void *arg)
-{
- OssData *od = data;
- return mixer_control(od->mixer, cmd, arg);
-}
-
const struct audio_output_plugin ossPlugin = {
.name = "oss",
.test_default_device = oss_testDefault,
.init = oss_initDriver,
.finish = oss_finishDriver,
+ .get_mixer = oss_get_mixer,
.open = oss_openDevice,
.play = oss_playAudio,
.cancel = oss_dropBufferedAudio,
.close = oss_closeDevice,
- .control = oss_control,
};