mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-29 07:57:59 -04:00
Added snd_pcm_hw_params_get_min_align; changed get_format, get_subformat and get_access function to return not mixed error and return value
This commit is contained in:
parent
c25879f9d9
commit
677b0f60d6
12 changed files with 108 additions and 33 deletions
|
|
@ -263,13 +263,16 @@ static int snd_pcm_hw_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
|
|||
if (hw->mmap_emulation) {
|
||||
snd_pcm_hw_params_t old = *params;
|
||||
if (hw_params_call(hw, params) < 0) {
|
||||
snd_pcm_access_t access;
|
||||
snd_pcm_access_mask_t oldmask;
|
||||
const snd_mask_t *pmask;
|
||||
|
||||
*params = old;
|
||||
pmask = snd_pcm_hw_param_get_mask(params, SND_PCM_HW_PARAM_ACCESS);
|
||||
oldmask = *(snd_pcm_access_mask_t *)pmask;
|
||||
switch (snd_pcm_hw_params_get_access(params)) {
|
||||
if (snd_pcm_hw_params_get_access(params, &access) < 0)
|
||||
goto _err;
|
||||
switch (access) {
|
||||
case SND_PCM_ACCESS_MMAP_INTERLEAVED:
|
||||
snd_pcm_access_mask_reset((snd_pcm_access_mask_t *)pmask, SND_PCM_ACCESS_MMAP_INTERLEAVED);
|
||||
snd_pcm_access_mask_set((snd_pcm_access_mask_t *)pmask, SND_PCM_ACCESS_RW_INTERLEAVED);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue