summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitrij D. Czarkoff <czarkoff@gmail.com>2016-09-25 10:51:13 +0200
committerDmitrij D. Czarkoff <czarkoff@gmail.com>2016-09-25 10:51:13 +0200
commitbb9ef7c89ecdc05a88973b060fb8b9722d1f3933 (patch)
tree0f845879383c2011dc251b9ac0485de028b5cd28
parent4d7fd88a1943f04833f7fce58bc439e0fca2ae6f (diff)
sndio: use driver-suggested buffer size
Sndio provides value of buffer size (par->bufsz) that is equal to audio delay in audio driver. Using buffer under this size causes underruns.
-rw-r--r--modules/sndio/sndio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/sndio/sndio.c b/modules/sndio/sndio.c
index 69c4b27..b20efe0 100644
--- a/modules/sndio/sndio.c
+++ b/modules/sndio/sndio.c
@@ -186,7 +186,7 @@ static int src_alloc(struct ausrc_st **stp, const struct ausrc *as,
goto out;
}
- st->sampc = prm->srate * prm->ch * prm->ptime / 1000;
+ st->sampc = par->bufsz / 2;
st->sampv = mem_alloc(2 * st->sampc, NULL);
if (!st->sampv) {