If a WAV file has extra info chunks (IART, ICMT, etc) the
FLAC encoder (FLAC v1.1.0 Windows - also tested with
1.0.4, same result) spits out error messages, although it
seems to still encode the file ok.
This is the output:
--------------------------------------------
X:\>flac RIFF-info.wav
flac 1.1.0, Copyright (C) 2000,2001,2002,2003 Josh
Coalson
flac comes with ABSOLUTELY NO WARRANTY. This
is free software, and you are
welcome to redistribute it under certain conditions.
Type `flac' for details.
options: -P 4096 -b 4608 -m -l 8 -q 0 -r 3,3
RIFF-info.wav: 68% complete, ratio=0.540RIFF-info.wav:
WARNING: skipping unknown
sub-chunk 'LIST'
RIFF-info.wav: WARNING: skipping unknown sub-
chunk 'DISP'
RIFF-info.wav: WARNING: skipping unknown sub-
chunk 'DISP'
RIFF-info.wav: ERROR: unexpected EOF
--------------------------------------------
This is the 10-second (44-16-1) test file:
http://www.silisoftware.com/RIFF-info.wav
Same file, no extra chunks, compresses fine:
http://www.silisoftware.com/RIFF-noinfo.wav
Logged In: YES
user_id=78173
OK, I grabbed these two files and will look into the problem. Thanks.
Josh
Logged In: YES
user_id=78173
OK, the problem is that the last DISP subchunk in RIFF-info.wav has an
incorrect size, it says it is 21 bytes when it is really 22.
You can test this yourself, using hexedit. Change the byte at offset
0xE34D0 from 0x15 to 0x16 and encode it. It should work as expected.
Josh
Logged In: YES
user_id=429434
That is actually according to spec (annoying though it is).
RIFF chunks specify a size, but are actually padded to be
word-aligned (ie size is an even number), so if it says 21
bytes, there's 21 bytes of data and 1 byte of padding.
Logged In: YES
user_id=78173
Hmm, I thought that was only AIFF... I'll reopen this one but it
should not be much trouble to fix as the AIFF code already
does this.
Josh
Logged In: YES
user_id=78173
OK, after a long while, I checked in the fix to
CVS, will close after the next release.
Josh
Logged In: YES
user_id=450189
I think that RIFF was originally a copy of the AIFF spec with the
byte-order flipped and the header format changed. The fact that
both are padded to 16-bit boundaries in the same way is not too
surprising.
Logged In: YES
user_id=450189
I think that RIFF was originally a copy of the AIFF spec with the
byte-order flipped and the header format changed. The fact that
both are padded to 16-bit boundaries in the same way is not too
surprising.