Check default_monitor_time_sec for pulseaudio condition check 85/315185/4 accepted/tizen/unified/20240731.160043 accepted/tizen/unified/dev/20240805.054433 accepted/tizen/unified/toolchain/20240812.133352 accepted/tizen/unified/x/20240801.044245 accepted/tizen/unified/x/asan/20240813.231832
authorJaechul Lee <jcsing.lee@samsung.com>
Fri, 26 Jul 2024 07:39:27 +0000 (16:39 +0900)
committerJaechul Lee <jcsing.lee@samsung.com>
Mon, 29 Jul 2024 07:37:47 +0000 (16:37 +0900)
[Version] 15.0.80
[Issue Type] Update

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

index 6f60cf64545f5994aa6538d30d5e4d06af32f7fb..3162c62dd4b1ae06d4a36bc933901dfefab7154a 100644 (file)
@@ -2,7 +2,7 @@
 
 Name:             pulseaudio-modules-tizen
 Summary:          Pulseaudio modules for Tizen
-Version:          15.0.79
+Version:          15.0.80
 Release:          0
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
index 7a4afdd8a419be6a3aa0c953da3829662b926e76..f325581098b8e98bb18ee6d576b39c6081df2e66 100644 (file)
@@ -81,8 +81,6 @@ static const char* stream_manager_media_names_for_skip[NAME_FOR_SKIP_MAX] = {"pu
 #define MUTE_KEY    "mute_by_device_disconnection"
 #define TIMED_UNMUTE_USEC    300000
 
-#define MONITORING_INTERVAL_SEC 3 /* FIXME: make this configurable */
-
 static const char* process_command_type_str[] = {
     [PROCESS_COMMAND_PREPARE] = "PREPARE",
     [PROCESS_COMMAND_CHANGE_ROUTE_BY_STREAM_STARTED] = "CHANGE_ROUTE_BY_STREAM_STARTED",
@@ -3487,7 +3485,7 @@ static void monitoring_cb(pa_mainloop_api *a, pa_time_event *e, const struct tim
     pa_core_dump_source_outputs(m->core);
     dump_ducking(m);
 
-    pa_core_rttime_restart(m->core, e, pa_rtclock_now() + (MONITORING_INTERVAL_SEC * PA_USEC_PER_SEC));
+    pa_core_rttime_restart(m->core, e, pa_rtclock_now() + (m->core->default_monitor_time_sec * PA_USEC_PER_SEC));
 }
 
 static int active_device_filter_func(const void *i, const void *device_type) {
@@ -4018,8 +4016,8 @@ pa_stream_manager* pa_stream_manager_get(pa_core *c) {
 
     set_initial_active_device(m);
 
-    // FIXME: timer should be configurable by daemon.conf
-    m->time_event_for_monitoring = pa_core_rttime_new(m->core, pa_rtclock_now() + (3 * PA_USEC_PER_SEC), monitoring_cb, m);
+    if (c->default_monitor_time_sec > 0)
+        m->time_event_for_monitoring = pa_core_rttime_new(m->core, pa_rtclock_now() + (c->default_monitor_time_sec * PA_USEC_PER_SEC), monitoring_cb, m);
 
     pa_shared_set(c, SHARED_STREAM_MANAGER, m);