diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-12-14 22:26:05 +0100 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-12-14 22:26:05 +0100 |
commit | 85348e09449ca64ecf099477520e99a66e608137 (patch) | |
tree | dfa422aa9f7d71071383456635ef9e1ec536d179 /streamer.c | |
parent | d6c8bce138e4694116a41b7f156b69dc508e0132 (diff) |
streamer: possible fix to bug #1010, avoid sleeping until buffer fills to 50%
Diffstat (limited to 'streamer.c')
-rw-r--r-- | streamer.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } } |