From 4a0e9058a919d7e014847070a388e4030b805bae Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Thu, 21 Feb 2002 15:03:50 +0000 Subject: [PATCH] Fixed xfer variable initialization for capture in avail_update() --- src/pcm/pcm_plugin.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c index bbc065c7..53635cf2 100644 --- a/src/pcm/pcm_plugin.c +++ b/src/pcm/pcm_plugin.c @@ -496,11 +496,10 @@ snd_pcm_sframes_t snd_pcm_plugin_avail_update(snd_pcm_t *pcm) const snd_pcm_channel_area_t *areas; snd_pcm_uframes_t xfer, hw_offset, size; - size = snd_pcm_mmap_capture_avail(pcm); - size = pcm->buffer_size - size; + xfer = snd_pcm_mmap_capture_avail(pcm); + size = pcm->buffer_size - xfer; areas = snd_pcm_mmap_areas(pcm); hw_offset = snd_pcm_mmap_hw_offset(pcm); - xfer = 0; while (size > 0 && slave_size > 0) { snd_pcm_uframes_t frames = size; snd_pcm_uframes_t cont = pcm->buffer_size - hw_offset; -- 2.47.1