mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
Unconditionally drop on capture close
This commit is contained in:
parent
521ccc49bb
commit
751c88c0e6
1 changed files with 2 additions and 1 deletions
|
|
@ -56,7 +56,8 @@ int snd_pcm_close(snd_pcm_t *pcm)
|
|||
int err;
|
||||
assert(pcm);
|
||||
if (pcm->setup) {
|
||||
if (pcm->mode & SND_PCM_NONBLOCK)
|
||||
if (pcm->mode & SND_PCM_NONBLOCK ||
|
||||
pcm->stream == SND_PCM_STREAM_CAPTURE)
|
||||
snd_pcm_drop(pcm);
|
||||
else
|
||||
snd_pcm_drain(pcm);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue