Mark H. David
2017-May-26 23:20 UTC
[flac-dev] warning that legacy WAVE file has format type 1 but bits-per-sample is 24
Thank you for writing and pointing out that one can have WAVE files
without getting the warning, and that your library does it.
I found out Goldwave (Windows software) writes 24-bit WAVE files that
do not get the warning. (Good for them!)
However, the flac executable from the flac reference software
apparently produces WAVE files that do get the warning.
Example annotated log:
Encode a 24-bit WAVE file (produced by Goldwave) into a FLAC file:
$ flac -V junk-24.wav
flac 1.3.2
Copyright (C) 2000-2009 Josh Coalson, 2011-2016 Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for
details.
junk-24.wav: Verify OK, wrote 64836 bytes, ratio=0.001
Decode the FLAC file back into a WAVE file:
$ flac --decode --output-name=junk-24-back-out.wav junk-24.flac
flac 1.3.2
Copyright (C) 2000-2009 Josh Coalson, 2011-2016 Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for
details.
junk-24.flac: done
Encode the resulting WAVE file into a FLAC file:
$ flac -V junk-24-back-out.wav
flac 1.3.2
Copyright (C) 2000-2009 Josh Coalson, 2011-2016 Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for
details.
junk-24-back-out.wav: WARNING: legacy WAVE file has format type 1 but
bits-per-sample=24
junk-24-back-out.wav: Verify OK, wrote 64792 bytes, ratio=0.001
Notice the warning was given only for the WAVE file produced by the
flac reference executable.
Should I file a bug for this?
Thanks,
Mark
----- Original message -----
From: Erik de Castro Lopo <mle+la at mega-nerd.com>
To: flac-dev at xiph.org
Subject: Re: [flac-dev] warning that legacy WAVE file has format type 1 but
bits-per-sample is 24
Date: Sat, 27 May 2017 08:40:24 +1000
Mark H. David wrote:
> I'm new at this and trying to understand it. Can someone explain?\
You are correct. With a wFormatTag of 1, the bist per sample should be
either 8 or 16 (according to the Microsoft specs).
> Also, a related but more practical question: is there *any* way to
> create a 24- or 32-bits-per-sample WAVE file without getting this
> warning when flac tries to encode it?
Yes there is. To avoid this wanring the it should have a WAVE_FORMATEXTENSIBLE
wFormatTag. Its trivally easy to convert your legacy format file to
WAVEX using the sndfile-convert program that is part of
https://mega-nerd.com/libsndfile/
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
_______________________________________________
flac-dev mailing list
flac-dev at xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev
Erik de Castro Lopo
2017-May-27 04:52 UTC
[flac-dev] warning that legacy WAVE file has format type 1 but bits-per-sample is 24
Mark H. David wrote:> Notice the warning was given only for the WAVE file produced by the > flac reference executable.I agree. The flac decoder should not generate WAV files which it warns about when encoding.> Should I file a bug for this?No need. This is sufficient. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Brian Willoughby
2017-May-27 05:03 UTC
[flac-dev] warning that legacy WAVE file has format type 1 but bits-per-sample is 24
On May 26, 2017, at 9:52 PM, Erik de Castro Lopo <mle+la at mega-nerd.com> wrote:> Mark H. David wrote: >> Notice the warning was given only for the WAVE file produced by the >> flac reference executable. > > I agree. The flac decoder should not generate WAV files which it > warns about when encoding. > >> Should I file a bug for this? > > No need. This is sufficient. > > ErikAre there some (old) programs that will not accept WAVEX headers? I'm trying to think of why the flac utility worked this way in the first place. In any event, it seems like it would be prudent to add a command line option to preserve the existing behavior, just in case anyone has archived their audio using FLAC and would need to maintain compatibility with the legacy WAVE format. It's not always possible to replace certain old programs, especially in recording studios. Brian Willoughby Sound Consulting
Erik de Castro Lopo
2017-May-27 07:23 UTC
[flac-dev] warning that legacy WAVE file has format type 1 but bits-per-sample is 24
Erik de Castro Lopo wrote:> > Notice the warning was given only for the WAVE file produced by the > > flac reference executable. > > I agree. The flac decoder should not generate WAV files which it > warns about when encoding.Fixed in Git. Thanks, Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/