From 1185611ac1ac0e286c63a0968874d421096e6502 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 9 Nov 2009 11:48:23 +0100 Subject: [PATCH] arecord: fix wrong chunk_size initialization when verbose and mmap flags are set Signed-off-by: Jaroslav Kysela --- aplay/aplay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aplay/aplay.c b/aplay/aplay.c index af6fede..22a5fe0 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -1115,9 +1115,9 @@ static void set_params(void) /* show mmap buffer arragment */ if (mmap_flag && verbose) { const snd_pcm_channel_area_t *areas; - snd_pcm_uframes_t offset; + snd_pcm_uframes_t offset, size = chunk_size; int i; - err = snd_pcm_mmap_begin(handle, &areas, &offset, &chunk_size); + err = snd_pcm_mmap_begin(handle, &areas, &offset, &size); if (err < 0) { error("snd_pcm_mmap_begin problem: %s", snd_strerror(err)); exit(EXIT_FAILURE);