aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/pulse_output_plugin.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-10-23 10:33:26 +0200
committerMax Kellermann <max@duempel.org>2009-10-23 10:33:26 +0200
commitc426a0bc5cc641ecd044c389f7180dad50a355bf (patch)
treebf51b958dcc8de591d64e1880cc29a3a078b5ddb /src/output/pulse_output_plugin.h
parentacc99da73d7f5ca0ce63aaf770764d0afcbd7de2 (diff)
downloadmpd-c426a0bc5cc641ecd044c389f7180dad50a355bf.tar.gz
mpd-c426a0bc5cc641ecd044c389f7180dad50a355bf.tar.xz
mpd-c426a0bc5cc641ecd044c389f7180dad50a355bf.zip
output/pulse: call mixer on state changes
Don't let the mixer plugin "override" the libpulse callbacks. Instead, add a "mixer" attribute to the pulse_output struct, and call the mixer on all interesting events.
Diffstat (limited to 'src/output/pulse_output_plugin.h')
-rw-r--r--src/output/pulse_output_plugin.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/output/pulse_output_plugin.h b/src/output/pulse_output_plugin.h
index fc2a7d4d5..c6e5e5b3a 100644
--- a/src/output/pulse_output_plugin.h
+++ b/src/output/pulse_output_plugin.h
@@ -23,6 +23,8 @@
#include <stdbool.h>
#include <stddef.h>
+#include <glib.h>
+
#if !defined(PA_CHECK_VERSION)
/**
* This macro was implemented in libpulse 0.9.16.
@@ -31,12 +33,15 @@
#endif
struct pa_operation;
+struct pa_cvolume;
struct pulse_output {
const char *name;
const char *server;
const char *sink;
+ struct pulse_mixer *mixer;
+
struct pa_threaded_mainloop *mainloop;
struct pa_context *context;
struct pa_stream *stream;
@@ -53,6 +58,13 @@ struct pulse_output {
};
void
-pulse_output_context_state_cb(struct pa_context *context, void *userdata);
+pulse_output_set_mixer(struct pulse_output *po, struct pulse_mixer *pm);
+
+void
+pulse_output_clear_mixer(struct pulse_output *po, struct pulse_mixer *pm);
+
+bool
+pulse_output_set_volume(struct pulse_output *po,
+ const struct pa_cvolume *volume, GError **error_r);
#endif