summaryrefslogtreecommitdiff
path: root/streamer.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-12-14 22:26:05 +0100
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-12-14 22:26:05 +0100
commit85348e09449ca64ecf099477520e99a66e608137 (patch)
treedfa422aa9f7d71071383456635ef9e1ec536d179 /streamer.c
parentd6c8bce138e4694116a41b7f156b69dc508e0132 (diff)
streamer: possible fix to bug #1010, avoid sleeping until buffer fills to 50%
Diffstat (limited to 'streamer.c')
-rw-r--r--streamer.c2
1 files changed, 1 insertions, 1 deletions
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);
}
}