stream-manager: Mute streams only belong to the disconnected device 07/115307/2
authorSangchul Lee <sc11.lee@samsung.com>
Fri, 17 Feb 2017 08:43:48 +0000 (17:43 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Fri, 17 Feb 2017 09:26:08 +0000 (18:26 +0900)
[Version] 5.0.134
[Profile] Common
[Issue Type] Bug fix

Change-Id: Ied92ed02e515c99778fd10504876189f66b3dcc7
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/pulseaudio-modules-tizen.spec
src/stream-manager.c

index 9613801..69e4734 100644 (file)
@@ -1,6 +1,6 @@
 Name:             pulseaudio-modules-tizen
 Summary:          Pulseaudio modules for Tizen
-Version:          5.0.133
+Version:          5.0.134
 Release:          0
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
index 366e78a..fe1b68d 100644 (file)
@@ -3763,7 +3763,7 @@ static void timed_unmute_cb(pa_mainloop_api *a, pa_time_event *e, const struct t
     m->time_event_for_unmute = NULL;
 }
 
-static void mute_sink_inputs_as_device_disconnection(pa_stream_manager *m, uint32_t event_id, bool need_to_mute, void *user_data) {
+static void mute_sink_inputs_as_device_disconnection(pa_stream_manager *m, uint32_t event_id, bool need_to_mute, pa_idxset *streams_of_disconnected_device) {
     pa_idxset *applied_streams;
 
     pa_assert(m);
@@ -3771,11 +3771,11 @@ static void mute_sink_inputs_as_device_disconnection(pa_stream_manager *m, uint3
     pa_log_info("mute_sink_inputs_as_device_disconnection(), event_id(%u), mute(%d) is called", event_id, need_to_mute);
 
     if (need_to_mute) {
-        if (!user_data) {
-            pa_log_error("invalid argument, inputs is needed");
+        if (!streams_of_disconnected_device) {
+            pa_log_error("invalid argument, inputs are needed");
             return;
         }
-        apply_volume_factor_to_streams(m->core->sink_inputs, &applied_streams);
+        apply_volume_factor_to_streams(streams_of_disconnected_device, &applied_streams);
         pa_hashmap_put(m->muted_streams, (void*)event_id, applied_streams);
 
         /* If PA_COMMUNICATOR_HOOK_EVENT_FULLY_HANDLED is not called for some reason,