From 4f0e3bce842ef42f07b04183c633e31f95903d36 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sat, 25 Jun 2016 17:12:35 +0200 Subject: [PATCH] emix: update sink of sink_input when changed this fixes none changing sinks in the app. --- src/modules/mixer/lib/backends/pulseaudio/pulse.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/mixer/lib/backends/pulseaudio/pulse.c b/src/modules/mixer/lib/backends/pulseaudio/pulse.c index 15fadead0..40dda059d 100644 --- a/src/modules/mixer/lib/backends/pulseaudio/pulse.c +++ b/src/modules/mixer/lib/backends/pulseaudio/pulse.c @@ -351,6 +351,7 @@ _sink_input_changed_cb(pa_context *c EINA_UNUSED, void *userdata EINA_UNUSED) { Sink_Input *input = NULL, *i; + Sink *s = NULL; Eina_List *l; EINA_SAFETY_ON_NULL_RETURN(ctx); @@ -387,6 +388,12 @@ _sink_input_changed_cb(pa_context *c EINA_UNUSED, input->base.volume = _pa_cvolume_convert(&info->volume); input->base.mute = !!info->mute; + EINA_LIST_FOREACH(ctx->sinks, l, s) + { + if (s->idx == (int)info->sink) + input->base.sink = (Emix_Sink *)s; + } + if (ctx->cb) ctx->cb((void *)ctx->userdata, EMIX_SINK_INPUT_CHANGED_EVENT, (Emix_Sink_Input *)input);