From f94bcae6bd6a3021a9474de5703360817f1ec1a8 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Thu, 3 Mar 2011 19:02:45 +0530 Subject: core: Suspend monitor when a sink enters passthrough mode In most cases it is expected that clients cannot consume compressed data from monitor sources, so we suspend the monitor source when the sink goes into passthrough mode. Eventually, when the extended API includes client notifications for changed formats, we should emit a notification on the monitor so that clients can decide what they want to do when this happens (disconnect or consume the data anyway). --- src/pulsecore/source.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pulsecore/source.c') diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c index 92fb80e0..15a5b8d9 100644 --- a/src/pulsecore/source.c +++ b/src/pulsecore/source.c @@ -514,7 +514,7 @@ int pa_source_suspend(pa_source *s, pa_bool_t suspend, pa_suspend_cause_t cause) pa_assert(PA_SOURCE_IS_LINKED(s->state)); pa_assert(cause != 0); - if (s->monitor_of) + if (s->monitor_of && cause != PA_SUSPEND_PASSTHROUGH) return -PA_ERR_NOTSUPPORTED; if (suspend) -- cgit