stream-manager: Fix not to apply ducking to new stream when after deactivating ducking 01/210801/1
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 25 Jul 2019 03:03:34 +0000 (12:03 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 25 Jul 2019 03:04:54 +0000 (12:04 +0900)
The target role member variable of stream ducking structure was not
de-initialized when deactivating ducking. It causes that new stream
with matching the target role is applied by the previous ducking.
It is now fixed.

[Version] 11.1.64
[Issue type] Bug fix

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

index b01e3f7f224c387fbd179b8ae27ccb7173bfd1c4..936c3ae95564e3a03ab4daa113d578cb9110160d 100644 (file)
@@ -1,6 +1,6 @@
 Name:             pulseaudio-modules-tizen
 Summary:          Pulseaudio modules for Tizen
-Version:          11.1.63
+Version:          11.1.64
 Release:          0
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
index c81d59a455ca4b0ef595597535b46153c6a36e8b..0ffdd725e1043cd2dadb83ff866b12d97caa078e 100644 (file)
@@ -1845,6 +1845,13 @@ static void handle_activate_ducking(DBusConnection *conn, DBusMessage *msg, void
         }
     }
 
+    if (!enable) {
+        memset(&sd->target_role, 0, sizeof(sd->target_role));
+        memset(&sd->vol_key, 0, sizeof(sd->vol_key));
+        sd->duration = 0;
+        sd->set_vol = PA_VOLUME_NORM;
+    }
+
     pa_log_info("ducking stream count %d", sd->ducking_stream_count);
 
     pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_OK], DBUS_TYPE_INVALID));