From c426a0bc5cc641ecd044c389f7180dad50a355bf Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 23 Oct 2009 10:33:26 +0200 Subject: 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. --- src/output/pulse_output_plugin.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/output/pulse_output_plugin.h') 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 #include +#include + #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 -- cgit v1.2.3