mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-06 13:29:59 -05:00
Added mode argument to open functions where it was missing. First part of CTL documentation
This commit is contained in:
parent
4bee8c5678
commit
7893ea238d
21 changed files with 570 additions and 276 deletions
|
|
@ -88,7 +88,7 @@ int snd_card_get_index(const char *string)
|
|||
for (card = 0; card < 32; card++) {
|
||||
if (snd_card_load(card) < 0)
|
||||
continue;
|
||||
if (snd_ctl_hw_open(&handle, NULL, card) < 0)
|
||||
if (snd_ctl_hw_open(&handle, NULL, card, 0) < 0)
|
||||
continue;
|
||||
if (snd_ctl_card_info(handle, &info) < 0) {
|
||||
snd_ctl_close(handle);
|
||||
|
|
@ -109,7 +109,7 @@ int snd_card_get_name(int card, char **name)
|
|||
|
||||
if (name == NULL)
|
||||
return -EINVAL;
|
||||
if ((err = snd_ctl_hw_open(&handle, NULL, card)) < 0)
|
||||
if ((err = snd_ctl_hw_open(&handle, NULL, card, 0)) < 0)
|
||||
return err;
|
||||
if ((err = snd_ctl_card_info(handle, &info)) < 0) {
|
||||
snd_ctl_close(handle);
|
||||
|
|
@ -130,7 +130,7 @@ int snd_card_get_longname(int card, char **name)
|
|||
|
||||
if (name == NULL)
|
||||
return -EINVAL;
|
||||
if ((err = snd_ctl_hw_open(&handle, NULL, card)) < 0)
|
||||
if ((err = snd_ctl_hw_open(&handle, NULL, card, 0)) < 0)
|
||||
return err;
|
||||
if ((err = snd_ctl_card_info(handle, &info)) < 0) {
|
||||
snd_ctl_close(handle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue