[Flac-dev] Support for CAF in flac command-line?
Erik de Castro Lopo
mle+la at mega-nerd.com
Sun Mar 6 01:22:53 PST 2011
Brian Willoughby wrote:
> Hopefully, libsndfile no longer uses the incorrect 0x7FFF (32767)
> factor for float to 16-bit integer conversions, because that would
> make it unacceptable for lossless file conversions.
That is a statement of opinion rather than fact but I won't go into
that here.
However, there is a way avoid that feature of libsndfile by avoiding
the use of floats during the conversion. For instance, when convering
from one format to another, sndfile-convert does this:
if ((outfileminor == SF_FORMAT_DOUBLE) || (outfileminor == SF_FORMAT_FLOAT)
|| (infileminor == SF_FORMAT_DOUBLE) || (infileminor == SF_FORMAT_FLOAT)
|| (infileminor == SF_FORMAT_VORBIS) || (outfileminor == SF_FORMAT_VORBIS))
sfe_copy_data_fp (outfile, infile, sfinfo.channels) ;
else
sfe_copy_data_int (outfile, infile, sfinfo.channels) ;
That is the second path (sfe_copy_data_int) would be used for FLAC
-> CAF and CAF -> FLAC conversions.
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
More information about the Flac-dev
mailing list