]> git.alsa-project.org Git - alsa-utils.git/commitdiff
arecord: fix wrong chunk_size initialization when verbose and mmap flags are set
authorJaroslav Kysela <perex@perex.cz>
Mon, 9 Nov 2009 10:48:23 +0000 (11:48 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 9 Nov 2009 10:49:51 +0000 (11:49 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
aplay/aplay.c

index af6fedebaee6fc4cdebf0f447f43b313e321b560..22a5fe054a1dcf7138045ac2ab5e8d9517a4da78 100644 (file)
@@ -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);