From 85348e09449ca64ecf099477520e99a66e608137 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Sat, 14 Dec 2013 22:26:05 +0100 Subject: streamer: possible fix to bug #1010, avoid sleeping until buffer fills to 50% --- streamer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'streamer.c') diff --git a/streamer.c b/streamer.c index 8e923cd0..64bd4669 100644 --- a/streamer.c +++ b/streamer.c @@ -1624,7 +1624,7 @@ streamer_thread (void *ctx) { // add 1ms here to compensate the rounding error // and another 1ms to buffer slightly faster then playing alloc_time -= ms+2; - if (!streamer_buffering && alloc_time > 0) { + if (streamer_ringbuf.remaining > STREAM_BUFFER_SIZE / 2 && !streamer_buffering && alloc_time > 0) { usleep (alloc_time * 1000); } } -- cgit v1.2.3