From aeff37eb6b1f3aba1b557faff147013991ba771e Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Tue, 29 Jul 2014 21:04:49 +0200 Subject: fixed streamer blocksize calculation --- streamer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/streamer.c b/streamer.c index 2811467f..daad5b5e 100644 --- a/streamer.c +++ b/streamer.c @@ -1784,7 +1784,7 @@ streamer_thread (void *ctx) { } int channels = output->fmt.channels; int bytes_in_one_second = rate * (output->fmt.bps>>3) * channels; - int blocksize = bytes_in_one_second / 40; + int blocksize = bytes_in_one_second / 120; if (blocksize < MIN_BLOCK_SIZE) { blocksize = MIN_BLOCK_SIZE; @@ -1876,6 +1876,7 @@ streamer_thread (void *ctx) { if (streamer_buffering || streamer_ringbuf.remaining < STREAM_BUFFER_SIZE / 2) { alloc_time >>= 1; } + if (alloc_time > 0) { usleep (alloc_time * 1000); } -- cgit v1.2.3