diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-07-29 21:04:49 +0200 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-07-29 21:04:49 +0200 |
commit | aeff37eb6b1f3aba1b557faff147013991ba771e (patch) | |
tree | c3acdf94ec1585fe8398f177b77d15bb186d2faa | |
parent | 27836fe26d0a1a69fb273a5a1a0372fc62c3b3ee (diff) |
fixed streamer blocksize calculation
-rw-r--r-- | streamer.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); } |