summaryrefslogtreecommitdiff
path: root/streamer.c
diff options
context:
space:
mode:
Diffstat (limited to 'streamer.c')
-rw-r--r--streamer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/streamer.c b/streamer.c
index c84a4097..432bc16b 100644
--- a/streamer.c
+++ b/streamer.c
@@ -1840,9 +1840,12 @@ 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 ((bytes_until_next_song > 0 && stop_after_current) || (streamer_ringbuf.remaining > STREAM_BUFFER_SIZE / 2 && !streamer_buffering && alloc_time > 0)) {
+ if (streamer_ringbuf.remaining > STREAM_BUFFER_SIZE / 2 && !streamer_buffering && alloc_time > 0) {
usleep (alloc_time * 1000);
}
+ else if (bytes_until_next_song > 0) {
+ usleep (20000);
+ }
}
// stop streaming song