Removed drain call from the snd_pcm_close() function, data are always dropped

This commit is contained in:
Jaroslav Kysela 2002-06-26 18:12:07 +00:00
parent 9b46e6b3f8
commit 3bcd8ebfcf

View file

@ -643,11 +643,7 @@ int snd_pcm_close(snd_pcm_t *pcm)
int err;
assert(pcm);
if (pcm->setup) {
if ((pcm->mode & SND_PCM_NONBLOCK) ||
pcm->stream == SND_PCM_STREAM_CAPTURE)
snd_pcm_drop(pcm);
else
snd_pcm_drain(pcm);
snd_pcm_drop(pcm);
err = snd_pcm_hw_free(pcm);
if (err < 0)
return err;