summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-07-29 21:04:49 +0200
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-07-29 21:04:49 +0200
commitaeff37eb6b1f3aba1b557faff147013991ba771e (patch)
treec3acdf94ec1585fe8398f177b77d15bb186d2faa
parent27836fe26d0a1a69fb273a5a1a0372fc62c3b3ee (diff)
fixed streamer blocksize calculation
-rw-r--r--streamer.c3
1 files changed, 2 insertions, 1 deletions
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);
}