From: Jaroslav Kysela Date: Wed, 26 Jun 2002 18:12:07 +0000 (+0000) Subject: Removed drain call from the snd_pcm_close() function, data are always dropped X-Git-Tag: v1.0.3~408 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=3bcd8ebfcf38a241834c7ee3624d95be3c3ad765;p=alsa-lib.git Removed drain call from the snd_pcm_close() function, data are always dropped --- diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c index f3a80ea6..76b0f276 100644 --- a/src/pcm/pcm.c +++ b/src/pcm/pcm.c @@ -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;