summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-08-15 00:16:25 +0200
committerLennart Poettering <lennart@poettering.net>2009-08-15 00:16:25 +0200
commit58d441f7ea7994d5a0e8bc5397e2986707eb466b (patch)
tree0a2a39193eef938262ddd9bd15898b14c2537a56 /src
parentfd1266c666f62f1c19bff6c1ab3397300e25ffed (diff)
log: place more rate limit invocations
Diffstat (limited to 'src')
-rw-r--r--src/modules/alsa/alsa-sink.c3
-rw-r--r--src/pulsecore/protocol-native.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index 1c38430f..a91b4b8a 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -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;
}
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index b6989aec..b578746e 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -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);
}