[pulseaudio-discuss] [PATCH 7/8] source: Don't update the monitor source rate, if the sink is running

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Thu Aug 8 23:57:58 PDT 2013


---
 src/pulsecore/source.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index a14d2e8..5784a78 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -993,6 +993,13 @@ bool pa_source_update_rate(pa_source *s, uint32_t rate, bool passthrough) {
         return false;
     }
 
+    if (s->monitor_of) {
+        if (PA_SINK_IS_RUNNING(s->monitor_of->state)) {
+            pa_log_info("Cannot update rate, this is a monitor source and the sink is running.");
+            return false;
+        }
+    }
+
     if (PA_UNLIKELY (desired_rate < 8000 ||
                      desired_rate > PA_RATE_MAX))
         return false;
-- 
1.8.1.2



More information about the pulseaudio-discuss mailing list