mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
Massive fixes in the mmap plugin (NONBLOCK, poll).
This commit is contained in:
parent
a8a134e334
commit
c808ac0806
2 changed files with 108 additions and 64 deletions
|
|
@ -193,6 +193,10 @@ int snd_pcm_nonblock_mode(snd_pcm_t *pcm, int nonblock)
|
|||
flags &= ~O_NONBLOCK;
|
||||
if (fcntl(fd, F_SETFL, flags) < 0)
|
||||
return -errno;
|
||||
if (nonblock)
|
||||
pcm->mode |= SND_PCM_OPEN_NONBLOCK;
|
||||
else
|
||||
pcm->mode &= ~SND_PCM_OPEN_NONBLOCK;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue