[PATCH] loopback: limit rate of a debug trace

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

 



---
Hi,

This trace is not often displayed but when it is, there is a lot of it!
This can happen when the source stream used in a loopback has been suspended.

Thanks,
Fr?d?ric

 src/modules/module-loopback.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/modules/module-loopback.c b/src/modules/module-loopback.c
index f33ac19..6644695 100644
--- a/src/modules/module-loopback.c
+++ b/src/modules/module-loopback.c
@@ -418,7 +418,8 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk
     u->in_pop = FALSE;
 
     if (pa_memblockq_peek(u->memblockq, chunk) < 0) {
-        pa_log_info("Could not peek into queue");
+        if (pa_log_ratelimit(PA_LOG_INFO))
+            pa_log_info("Could not peek into queue");
         return -1;
     }
 
-- 
1.7.5.4



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

  Powered by Linux