Skip to contentSkip to conversation

arecord without timelimit produces buggy wav files.

PATCH Applied Jordi Mallach 3 participants 5 messages Dec 18, 2002 – Dec 19, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arecord without timelimit produces buggy wav files.

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

Hello,

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

Quoted 6 lines

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 renamed from aplay.c.orig +5 -0
@@ -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?

Signature · 3 lines
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/
Applied
#1 lore raw

Hi,

At Wed, 18 Dec 2002 15:45:58 +0100,

Quoted 3 lines · Jordi Mallach

[1 <text/plain; iso-8859-1 (quoted-printable)>]
[resent with my subscriber address... is someone moderating alsa-devel?]

no, but it's filtered only for subscribers.

Quoted 11 lines

Hello,

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

Quoted 6 lines

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.

thanks, applied to cvs with a bit modification.

Quoted 10 lines

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?

please post to alsa-devel. the bug tracking system seems not working effectively, so far...

Signature · 8 lines
Takashi Iwai <[email protected]>		SuSE Linux AG - www.suse.de
ALSA Developer				ALSA Project - www.alsa-project.org


-------------------------------------------------------
This SF.NET email is sponsored by: Geek Gift Procrastinating?
Get the perfect geek gift now!  Before the Holidays pass you by.
T H I N K G E E K . C O M      http://www.thinkgeek.com/sf/
#2 lore raw
Quoted 2 lines · Takashi Iwai
Quoted 1 line

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

no, but it's filtered only for subscribers.

Yeah, I mean, if non-subscriber posts are not going to be moderated (ie, make them go through manually), they should be rejected. Mailman said my post was waiting for "moderator approval".

Quoted 6 lines
Quoted 2 lines

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

thanks, applied to cvs with a bit modification.

please post to alsa-devel. the bug tracking system seems not working effectively, so far...

Ok, thanks.

Signature · 3 lines
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/
#3 lore raw

bug-tracking system.

In reply to Takashi Iwai
Quoted 7 lines · Takashi Iwai
Quoted 4 lines

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?

please post to alsa-devel. the bug tracking system seems not working effectively, so far...

Do you mean SourceForge?

Don't you think it should be documented THERE? Something like "please do not use, post reports to alsa-devel...".

It usually works like that: relatively new user/developer finds a bug, clicks "Bug reporting" from ALSA homepage and is in a system which "seems not working effectively".

Best regards,
--
Tomasz Motylewski

-------------------------------------------------------
This SF.NET email is sponsored by: Geek Gift Procrastinating? Get the perfect geek gift now! Before the Holidays pass you by.
T H I N K G E E K . C O M http://www.thinkgeek.com/sf/

#4 lore raw

Re: bug-tracking system.

At Thu, 19 Dec 2002 13:06:06 +0100 (CET),

Quoted 8 lines · tomasz motylewski
Quoted 5 lines · Takashi Iwai
Quoted 4 lines

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?

Quoted 4 lines
Quoted 2 lines

please post to alsa-devel. the bug tracking system seems not working effectively, so far...

Do you mean SourceForge?

yes.

Quoted 2 lines

Don't you think it should be documented THERE? Something like "please do not use, post reports to alsa-devel...".

yeah, IMHO, it would be better.

Quoted 3 lines

It usually works like that: relatively new user/developer finds a bug, clicks "Bug reporting" from ALSA homepage and is in a system which "seems not working effectively".

please note that the above comment is only my own.
it's likely biased much, since i prefer a system like bugzilla to sf's one. or, simply posts on devel ML, which is well archived. for me, sf's tracking system is nothing but annoying. again, this is just my opinion.

the current system might be helpful, for example, for jaroslav. but anyway, the situation atm looks not good; unresolved bugs has been growing and piled up, because no one moderates and assigns the bugs.

Takashi

-------------------------------------------------------
This SF.NET email is sponsored by: Geek Gift Procrastinating? Get the perfect geek gift now! Before the Holidays pass you by.
T H I N K G E E K . C O M http://www.thinkgeek.com/sf/