From 02d919efa153887bd939fc1bc9e4c88216cf0f24 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Mon, 17 Dec 2018 14:42:49 -0500 Subject: Reduce output buffering to 500 milliseconds 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 --- plugins/alsa/alsa-core-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/alsa') 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); -- cgit 1.2.3-korg