mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-27 01:40:09 -05:00
Fixed repeated prepare call
This commit is contained in:
parent
4ecd9eaa46
commit
a83b209df2
6 changed files with 14 additions and 5 deletions
|
|
@ -2099,7 +2099,7 @@ int snd_pcm_hw_refine(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
|||
max periods
|
||||
Return 0 on success or a negative number expressing the error.
|
||||
*/
|
||||
int snd_pcm_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
||||
int _snd_pcm_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
||||
{
|
||||
int err;
|
||||
snd_pcm_sw_params_t sw;
|
||||
|
|
@ -2154,6 +2154,14 @@ int snd_pcm_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
|||
pcm->access == SND_PCM_ACCESS_MMAP_COMPLEX) {
|
||||
err = snd_pcm_mmap(pcm);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
int snd_pcm_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
||||
{
|
||||
int err;
|
||||
assert(pcm && params);
|
||||
err = _snd_pcm_hw_params(pcm, params);
|
||||
if (err >= 0)
|
||||
err = snd_pcm_prepare(pcm);
|
||||
return err;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue