On Dec 14, 2014, at 5:23 PM, lvqcl <lvqcl.m...@gmail.com> wrote:
> Brian Willoughby wrote:
>>> Currently the header of a decoded WAV file can be different to the
>>> original WAV file because FLAC doesn't preserve 'fmt ' chunk.
>>> 
>>> For example: create a 24-bit stereo .wav file with WAVEFORMATEXTENSIBLE
>>> header with channel mask == 3. Encode it to .flac then decode back to .wav.
>>> FLAC creates a 24-bit stereo .wav file with WAVEFORMATEX header.
>> 
>> Did you try this when using the FLAC command-line option 
>> --keep-foreign-metadata?
> 
> Yes. I created a 24-bit stereo .wav file with SoX. It writes
> WAVEFORMATEXTENSIBLE 'fmt ' chunk and a 'fact' chunk. FLAC keeps
> 'fact' chunk but writes WAVEFORMATEX header.

Thanks for checking this out.

My vote: If --keep-foreign-metadata does not preserve the "header" of a 
RIFF/WAVE file (the header is actually a special chunk, 'fmt ', that does not 
always appear at the head of the file), then FLAC should be "fixed" so that 
this is also preserved when --keep-foreign-metadata is used. It should be as 
simple as saving the 'fmt ' chunk along with the others. If it's already being 
saved, then it should be even simpler to restore the "header" when decoding.

Brian Willoughby
Sound Consulting

_______________________________________________
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev

Reply via email to