[PATCH 3/8] sink, source: Don't care about default and alternate rate in passthrough mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In passthrough mode the device rate is set to match the stream rate,
and the default and alternate rates are ignored.
---
 src/pulsecore/sink.c   | 2 +-
 src/pulsecore/source.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 2f5174e..a4ad21a 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -1389,7 +1389,7 @@ bool pa_sink_update_rate(pa_sink *s, uint32_t rate, bool passthrough) {
     if (!s->update_rate)
         return false;
 
-    if (PA_UNLIKELY(default_rate == alternate_rate)) {
+    if (PA_UNLIKELY(default_rate == alternate_rate && !passthrough)) {
         pa_log_warn("Default and alternate sample rates are the same.");
         return false;
     }
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index c7f0127..55f85d0 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -979,7 +979,7 @@ bool pa_source_update_rate(pa_source *s, uint32_t rate, bool passthrough) {
     if (!s->update_rate && !s->monitor_of)
         return false;
 
-    if (PA_UNLIKELY(default_rate == alternate_rate)) {
+    if (PA_UNLIKELY(default_rate == alternate_rate && !passthrough)) {
         pa_log_warn("Default and alternate sample rates are the same.");
         return false;
     }
-- 
1.8.1.2



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux