mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
pcm: hw_params - copy periods and buffer_time to the local variable
It is expected to return the correct numbers for get_periods and get_buffer_time requests. Copy the appropriate fields in the hw_params call. Fixes: https://github.com/alsa-project/alsa-lib/issues/258 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
8033ff9996
commit
0222f45d11
1 changed files with 2 additions and 0 deletions
|
|
@ -2407,6 +2407,8 @@ int _snd_pcm_hw_params_internal(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
|||
INTERNAL(snd_pcm_hw_params_get_subformat)(params, &pcm->subformat);
|
||||
INTERNAL(snd_pcm_hw_params_get_channels)(params, &pcm->channels);
|
||||
INTERNAL(snd_pcm_hw_params_get_rate)(params, &pcm->rate, 0);
|
||||
snd_interval_copy(&pcm->periods, ¶ms->intervals[SND_PCM_HW_PARAM_PERIODS - SND_PCM_HW_PARAM_FIRST_INTERVAL]);
|
||||
snd_interval_copy(&pcm->buffer_time, ¶ms->intervals[SND_PCM_HW_PARAM_BUFFER_TIME - SND_PCM_HW_PARAM_FIRST_INTERVAL]);
|
||||
INTERNAL(snd_pcm_hw_params_get_period_time)(params, &pcm->period_time, 0);
|
||||
INTERNAL(snd_pcm_hw_params_get_period_size)(params, &pcm->period_size, 0);
|
||||
INTERNAL(snd_pcm_hw_params_get_buffer_size)(params, &pcm->buffer_size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue