diff options
author | Marcel Hollerbach <marcel-hollerbach@t-online.de> | 2016-06-25 17:12:35 +0200 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2016-07-15 09:59:55 -0400 |
commit | 52f33c985ab63343c1a5537b47bf3d019c554921 (patch) | |
tree | c66c133a25c8e47ee7c2c237e7a24362b9fdb7a1 | |
parent | ad3b76970a6ee39b3981b11771034126439a10eb (diff) | |
download | enlightenment-52f33c985ab63343c1a5537b47bf3d019c554921.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.c | 7 |
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); |