From: Sangchul Lee Date: Thu, 25 Jul 2019 07:44:57 +0000 (+0900) Subject: stream-manager: Ensure sending ducking changed signal even when unlinking sink-input... X-Git-Tag: accepted/tizen/unified/20190729.081033^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9525ec353a6a50fb07dbfef73b1fe0a285d7d3c0;p=platform%2Fcore%2Fmultimedia%2Fpulseaudio-modules-tizen.git stream-manager: Ensure sending ducking changed signal even when unlinking sink-input during ducking or unducking Even though a sink-input affected by ducking DBus method is unlinking in the middle of ducking or unducking process by ramp factor, the DBus signal for ducking changed callback should be emitted properly. This patch checks some conditions and emits the signal in that case. [Version] 11.1.66 [Issue type] Improvement Change-Id: Iab46f03af623f204ba351fa83941a2a03e77b4d3 Signed-off-by: Sangchul Lee --- diff --git a/packaging/pulseaudio-modules-tizen.spec b/packaging/pulseaudio-modules-tizen.spec index 4eb7764..14512a4 100644 --- a/packaging/pulseaudio-modules-tizen.spec +++ b/packaging/pulseaudio-modules-tizen.spec @@ -1,6 +1,6 @@ Name: pulseaudio-modules-tizen Summary: Pulseaudio modules for Tizen -Version: 11.1.65 +Version: 11.1.66 Release: 0 Group: Multimedia/Audio License: LGPL-2.1+ diff --git a/src/stream-manager.c b/src/stream-manager.c index 667fd50..24b7afe 100644 --- a/src/stream-manager.c +++ b/src/stream-manager.c @@ -2250,12 +2250,17 @@ static void remove_sink_input_from_ducking_streams(pa_stream_manager *m, pa_sink PA_HASHMAP_FOREACH(sd, m->stream_duckings, state) { PA_IDXSET_FOREACH(stream, sd->idx_ducking_streams, idx) { - if (stream == i) { - pa_log_info("remove stream(idx:%u,%p) from idx_ducking_streams, trigger_index(%u)", - i->index, i, sd->trigger_index); - pa_idxset_remove_by_data(sd->idx_ducking_streams, stream, NULL); - return; - } + if (stream != i) + continue; + + if ((strlen(sd->target_role) && !sd->is_ducked) || + (!strlen(sd->target_role) && sd->is_ducked)) + pa_hook_fire(&i->core->hooks[PA_CORE_HOOK_SINK_INPUT_RAMP_FINISH], i); + + pa_log_info("remove stream(idx:%u,%p) from idx_ducking_streams, trigger_index(%u)", + i->index, i, sd->trigger_index); + pa_idxset_remove_by_data(sd->idx_ducking_streams, stream, NULL); + return; } } }