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.
State Changed From-To: open->closed Patch committed, thanks!