mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Fixed wrong initialization of start_threshold
This commit is contained in:
parent
a6ad2629e3
commit
bd93d0a672
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue