mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-05 13:30:00 -05:00
Misc fixes and race condition cleaning
This commit is contained in:
parent
633815a591
commit
d5c49aaa8e
6 changed files with 295 additions and 283 deletions
|
|
@ -47,6 +47,12 @@ int snd_pcm_close(snd_pcm_t *pcm)
|
|||
int ret = 0;
|
||||
int err;
|
||||
assert(pcm);
|
||||
if (pcm->valid_setup) {
|
||||
if (pcm->mode & SND_PCM_NONBLOCK)
|
||||
snd_pcm_drop(pcm);
|
||||
else
|
||||
snd_pcm_drain(pcm);
|
||||
}
|
||||
if (pcm->mmap_info) {
|
||||
if ((err = snd_pcm_munmap(pcm)) < 0)
|
||||
ret = err;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue