mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
assert -> return error code in hw_params
This commit is contained in:
parent
965222c3d9
commit
ba4ddd169f
1 changed files with 6 additions and 3 deletions
|
|
@ -877,11 +877,14 @@ static int snd_pcm_plug_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = snd_pcm_plug_hw_refine_sprepare(pcm, &sparams);
|
err = snd_pcm_plug_hw_refine_sprepare(pcm, &sparams);
|
||||||
assert(err >= 0);
|
if (err < 0)
|
||||||
|
return err;
|
||||||
err = snd_pcm_plug_hw_refine_schange(pcm, params, &sparams);
|
err = snd_pcm_plug_hw_refine_schange(pcm, params, &sparams);
|
||||||
assert(err >= 0);
|
if (err < 0)
|
||||||
|
return err;
|
||||||
err = snd_pcm_hw_refine_soft(slave, &sparams);
|
err = snd_pcm_hw_refine_soft(slave, &sparams);
|
||||||
assert(err >= 0);
|
if (err < 0)
|
||||||
|
return err;
|
||||||
|
|
||||||
INTERNAL(snd_pcm_hw_params_get_access)(params, &clt_params.access);
|
INTERNAL(snd_pcm_hw_params_get_access)(params, &clt_params.access);
|
||||||
INTERNAL(snd_pcm_hw_params_get_format)(params, &clt_params.format);
|
INTERNAL(snd_pcm_hw_params_get_format)(params, &clt_params.format);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue