summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-06-25 17:12:35 +0200
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-06-25 17:12:35 +0200
commit4f0e3bce842ef42f07b04183c633e31f95903d36 (patch)
tree163ae0ecbc3f6e7d0ade5b1c0138bd689e35ce04
parentafeb588632e98bcac3b20258d72790c7236cf071 (diff)
downloadenlightenment-4f0e3bce842ef42f07b04183c633e31f95903d36.tar.gz
emix: update sink of sink_input when changed
this fixes none changing sinks in the app.
-rw-r--r--src/modules/mixer/lib/backends/pulseaudio/pulse.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/mixer/lib/backends/pulseaudio/pulse.c b/src/modules/mixer/lib/backends/pulseaudio/pulse.c
index 15fadead09..40dda059d0 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);