mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -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;
|
int err;
|
||||||
assert(pcm);
|
assert(pcm);
|
||||||
if (pcm->setup) {
|
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);
|
snd_pcm_drop(pcm);
|
||||||
else
|
else
|
||||||
snd_pcm_drain(pcm);
|
snd_pcm_drain(pcm);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue