mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-03 09:01:52 -05:00
Added SND_CTL_READONLY
This commit is contained in:
parent
098932ce57
commit
7fcea07002
3 changed files with 7 additions and 3 deletions
|
|
@ -302,7 +302,10 @@ int snd_ctl_hw_open(snd_ctl_t **handle, const char *name, int card, int mode)
|
|||
|
||||
assert(card >= 0 && card < 32);
|
||||
sprintf(filename, SNDRV_FILE_CONTROL, card);
|
||||
fmode = O_RDWR;
|
||||
if (mode & SND_CTL_READONLY)
|
||||
fmode = O_RDONLY;
|
||||
else
|
||||
fmode = O_RDWR;
|
||||
if (mode & SND_CTL_NONBLOCK)
|
||||
fmode |= O_NONBLOCK;
|
||||
if (mode & SND_CTL_ASYNC)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue