[pulseaudio-discuss] [PATCH] loopback: limit rate of a debug trace

Frédéric Dalleau frederic.dalleau at linux.intel.com
Wed May 2 08:41:09 PDT 2012


---
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



More information about the pulseaudio-discuss mailing list