From: Jaroslav Kysela Date: Thu, 25 Oct 2001 13:53:35 +0000 (+0000) Subject: Fixed the share->state when DRAINING X-Git-Tag: v1.0.3~622 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=07e66fcfbd63aac289c6d6f5069487b6c2156aeb;p=alsa-lib.git Fixed the share->state when DRAINING --- diff --git a/src/pcm/pcm_share.c b/src/pcm/pcm_share.c index 1d91ebfb..9b1d28ba 100644 --- a/src/pcm/pcm_share.c +++ b/src/pcm/pcm_share.c @@ -210,7 +210,7 @@ static snd_pcm_uframes_t _snd_pcm_share_missing(snd_pcm_t *pcm) share->hw_ptr = slave->hw_ptr; avail = snd_pcm_mmap_avail(pcm); if (avail >= pcm->stop_threshold) { - _snd_pcm_share_stop(pcm, SND_PCM_STATE_XRUN); + _snd_pcm_share_stop(pcm, share->state == SND_PCM_STATE_DRAINING ? SND_PCM_STATE_SETUP : SND_PCM_STATE_XRUN); goto update_poll; } hw_avail = buffer_size - avail;