Unconditionally drop on capture close

This commit is contained in:
Abramo Bagnara 2001-03-07 13:56:13 +00:00
parent 521ccc49bb
commit 751c88c0e6

View file

@ -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);