]> code.delx.au - pulseaudio/commitdiff
log: place more rate limit invocations
authorLennart Poettering <lennart@poettering.net>
Fri, 14 Aug 2009 22:16:25 +0000 (00:16 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 14 Aug 2009 22:16:25 +0000 (00:16 +0200)
src/modules/alsa/alsa-sink.c
src/pulsecore/protocol-native.c

index 1c38430f22b36fa2ad2f3add191dee19b0152a38..a91b4b8a1403dc8df8c3bb7808c7e88f28a01dde 100644 (file)
@@ -1292,7 +1292,8 @@ static void thread_func(void *userdata) {
                      * we have filled the buffer at least once
                      * completely.*/
 
-                    pa_log_debug("Cutting sleep time for the initial iterations by half.");
+                    if (pa_log_ratelimit())
+                        pa_log_debug("Cutting sleep time for the initial iterations by half.");
                     sleep_usec /= 2;
                 }
 
index b6989aec8de72d07a1ac236f201a46328985f01f..b578746e780d8795e897e9d5411bce61e8358525 100644 (file)
@@ -1345,7 +1345,9 @@ static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int
 /*             pa_log("sink input post: %lu %lli", (unsigned long) chunk->length, (long long) windex); */
 
             if (pa_memblockq_push_align(s->memblockq, chunk) < 0) {
-                pa_log_warn("Failed to push data into queue");
+
+                if (pa_log_ratelimit())
+                    pa_log_warn("Failed to push data into queue");
                 pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(s), PLAYBACK_STREAM_MESSAGE_OVERFLOW, NULL, 0, NULL, NULL);
                 pa_memblockq_seek(s->memblockq, (int64_t) chunk->length, PA_SEEK_RELATIVE, TRUE);
             }