Bug 42975 - audio/dagrab generates corrupt mono .WAV files
Summary: audio/dagrab generates corrupt mono .WAV files
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-20 00:30 UTC by peter.jeremy
Modified: 2003-03-05 10:14 UTC (History)
0 users

See Also:


Attachments
file.diff (2.17 KB, patch)
2002-09-20 00:30 UTC, peter.jeremy
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description peter.jeremy 2002-09-20 00:30:03 UTC
	When generating mono .WAV files from a CD, dagrab generates an
	incorrect RIFF header and the last (partial) block is saved in
	stereo rather than mono.  Also no error checking is performed
	on writes in mono mode.

	The problem in the header is that the total chunk size (Rlen)
	is not adjusted for mono data and always contains the size
	assuming stereo data.

	For the last (partial) block, there is no test whether the
	data is being saved as mono or stereo - the block is always
	written in stereo mode.

Fix: The following patch is relative to dagrab.c after the
	FreeBSD ports patch.  The patches don't clash but the line
	numbers may be different.
How-To-Repeat: 	Grab a track in mono mode and use a WAV file analyser (eg
	sndfile_info which is part of libsndfile) to validate the
	structure.
Comment 1 Kris Kennaway freebsd_committer freebsd_triage 2003-03-05 10:14:25 UTC
State Changed
From-To: open->closed

Patch committed, thanks!