]> git.alsa-project.org Git - alsa-utils.git/commitdiff
amorac <amorac@ole.com>
authorJaroslav Kysela <perex@perex.cz>
Tue, 27 Apr 2004 13:38:59 +0000 (13:38 +0000)
committerJaroslav Kysela <perex@perex.cz>
Tue, 27 Apr 2004 13:38:59 +0000 (13:38 +0000)
arecord doesn't record if you don't indicate the time limit
The problem happens when the Wave-file is checked for it being even.
I have tried with the next change in aplay.c and it seems to work fine.

aplay/aplay.c

index 491cb0ddbae072d28380a65e4fd0dcbc20784084..d7ad0fbc3bda3053bfec6bf0f08836495f4b9d7a 100644 (file)
@@ -1922,7 +1922,10 @@ static void capture(char *name)
        pbrec_count = calc_count();
        /* WAVE-file should be even (I'm not sure), but wasting one byte
           isn't a problem (this can only be in 8 bit mono) */
-       pbrec_count += pbrec_count % 2;
+       if (pbrec_count < LLONG_MAX)
+               pbrec_count += pbrec_count % 2;
+       else
+               pbrec_count -= pbrec_count % 2;
        if (pbrec_count == 0)
                pbrec_count -= 2;
        if (fmt_rec_table[file_type].start)