mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04: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
|
|
@ -34,7 +34,7 @@
|
|||
static int snd_hctl_compare_default(const snd_hctl_elem_t *c1,
|
||||
const snd_hctl_elem_t *c2);
|
||||
|
||||
int snd_hctl_open(snd_hctl_t **hctlp, const char *name)
|
||||
int snd_hctl_open(snd_hctl_t **hctlp, const char *name, int mode)
|
||||
{
|
||||
snd_hctl_t *hctl;
|
||||
snd_ctl_t *ctl;
|
||||
|
|
@ -42,7 +42,7 @@ int snd_hctl_open(snd_hctl_t **hctlp, const char *name)
|
|||
|
||||
assert(hctlp);
|
||||
*hctlp = NULL;
|
||||
if ((err = snd_ctl_open(&ctl, name)) < 0)
|
||||
if ((err = snd_ctl_open(&ctl, name, mode)) < 0)
|
||||
return err;
|
||||
if ((hctl = (snd_hctl_t *)calloc(1, sizeof(snd_hctl_t))) == NULL) {
|
||||
snd_ctl_close(ctl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue