[resent with my subscriber address... is someone moderating alsa-devel?]

Hello,

Daniel Kobras reported a bug in arecord ages ago, against
beta10a. Quoting:

> When running arecord without timelimit (no -d option), the size of the
> RIFF chunk in a wav file is not updated when the recording is finished.
> The resulting wav causes trouble with some applications as the dummy
> chunk size is negative. (Chunk sizes are spec'ed as signed integer.
> Don't ask me why.) The following patch adds the proper fixup for the
> RIFF chunk. Patch against version 0.9.0beta10a-2 of alsa-utils.


--- aplay.c.orig        Sat Dec  1 21:26:46 2001
+++ aplay.c     Fri Feb  1 18:11:39 2002
@@ -1548,12 +1548,17 @@
 {                              /* only close output */
        WaveChunkHeader cd;
        off_t length_seek;
+       u_int rifflen;
        
        length_seek = sizeof(WaveHeader) +
                      sizeof(WaveChunkHeader) +
                      sizeof(WaveFmtBody);
        cd.type = WAV_DATA;
        cd.length = LE_INT(fdcount);
+       rifflen = fdcount + 2*sizeof(WaveChunkHeader) + sizeof(WaveFmtBody) + 4;
+       rifflen = LE_INT(rifflen);
+       if (lseek(fd, 4, SEEK_SET) == 4)
+               write(fd, &rifflen, 4);
        if (lseek(fd, length_seek, SEEK_SET) == length_seek)
                write(fd, &cd, sizeof(WaveChunkHeader));
        if (fd != 1)

The current Debian packages have this patch applied, and the full bug
log is in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=131875.

Thanks,
Jordi

PS: recently, new people started working on Debian's ALSA packages.
We'll try to forward all the bugs and patches that have piled up against
our packages in the previous era. What's the prefered way of reporting
bugs and problems against alsa packages components?
-- 
Jordi Mallach Pérez  --  Debian developer     http://www.debian.org/
[EMAIL PROTECTED]     [EMAIL PROTECTED]     http://www.sindominio.net/
GnuPG public key information available at http://oskuro.net/~jordi/

Attachment: msg05719/pgp00000.pgp
Description: PGP signature

Reply via email to