aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2018-12-17 14:42:49 -0500
committerScott Murray <scott.murray@konsulko.com>2018-12-17 14:42:49 -0500
commit02d919efa153887bd939fc1bc9e4c88216cf0f24 (patch)
treea2753a208db2defb8c637052bea96f08da93989e
parent3d4a0868ae05b2f769971630caa510cda6bc8f39 (diff)
Reduce the output buffering from 2 seconds to 500 milliseconds to improve responsiveness during demos. 500 ms has been working well in my tests, reducing it further than that seems to cause playback stuttering issues that should be investigated when the buffer size is made configurable. Change-Id: Ie42c0a1de9e104608dd118a109a6bb25d8a2251d Signed-off-by: Scott Murray <scott.murray@konsulko.com>
-rw-r--r--plugins/alsa/alsa-core-pcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/alsa/alsa-core-pcm.c b/plugins/alsa/alsa-core-pcm.c
index 25872ae..7170945 100644
--- a/plugins/alsa/alsa-core-pcm.c
+++ b/plugins/alsa/alsa-core-pcm.c
@@ -708,7 +708,7 @@ PUBLIC int AlsaPcmCopy(SoftMixerT *mixer, AlsaStreamAudioT *stream, AlsaPcmCtlT
AFB_ApiInfo(mixer->api, "%s: Frame size is %zu", __func__, cHandle->frame_size);
- snd_pcm_uframes_t nbFrames = 2 * opts->rate; // Exactly 2 second of buffer
+ snd_pcm_uframes_t nbFrames = opts->rate / 2; // Exactly 500 milliseconds of buffer
cHandle->rbuf = alsa_ringbuf_new(nbFrames, cHandle->frame_size);