From bd93d0a6728953979c37405a10dd11549565484d Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 3 Feb 2004 16:14:39 +0000 Subject: [PATCH] Fixed wrong initialization of start_threshold --- test/pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/pcm.c b/test/pcm.c index 782c1ae9..325f6159 100644 --- a/test/pcm.c +++ b/test/pcm.c @@ -148,8 +148,8 @@ static int set_swparams(snd_pcm_t *handle, snd_pcm_sw_params_t *swparams) printf("Unable to determine current swparams for playback: %s\n", snd_strerror(err)); return err; } - /* start the transfer when the buffer is full */ - err = snd_pcm_sw_params_set_start_threshold(handle, swparams, buffer_size); + /* start the transfer when the buffer is almost full */ + err = snd_pcm_sw_params_set_start_threshold(handle, swparams, (buffer_size / period_size) * period_size); if (err < 0) { printf("Unable to set start threshold mode for playback: %s\n", snd_strerror(err)); return err; -- 2.47.1