bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=4f0e3bce842ef42f07b04183c633e31f95903d36

commit 4f0e3bce842ef42f07b04183c633e31f95903d36
Author: Marcel Hollerbach <marcel-hollerb...@t-online.de>
Date:   Sat Jun 25 17:12:35 2016 +0200

    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 15fadea..40dda05 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);

-- 


Reply via email to