[Flac-dev] Problems when using libFLAC to encode 24 bit content
justin at blorp.com
Fri Jul 14 19:09:06 PDT 2006
We are calling libFLAC. Here is the the initialization code:
FLAC__file_encoder_set_channels (m_enc, m_nch);
FLAC__file_encoder_set_bits_per_sample (m_enc, m_bps);
FLAC__file_encoder_set_sample_rate (m_enc, m_srate);
FLAC__file_encoder_set_filename (m_enc, fn);
int ems=0, ec=0, ms=0, lms=0, qlp=0, minr=2, maxr=2, rice=0, lpc=0;
// this is what we do for "level 5" but all of them don't work in 24 bit
ems = false;
ec = false;
ms = true;
lms = false;
qlp = 0;
minr = 0;
maxr = 3;
rice = 0;
lpc = 8;
if(m_nch == 1)
ms = false; lms = false;
and yes, flac -a results in all VERBATIM. and using this exact code in 16 bit
mode works fine, too.
On Fri, Jul 14, 2006 at 05:52:57PM -0700, Josh Coalson wrote:
> --- Justin Frankel <justin at blorp.com> wrote:
> > Hi everybody,
> > We have FLAC supported for input/output in REAPER
> > (http://www.reaper.fm), and the problem is that
> > when writing 24 bit FLAC files, the data isn't compressed (i.e. the
> > FLAC is slightly larger than
> > if it was writing to .WAV). The files play back fine, however, and 16
> > bit mode works great.
> > We're using flac-1.1.2, built on win32 with MSVC6 w/ SP5 + VCPP, and
> > NASM version 0.98.39
> hmm... on the encoding side there are quite a few things that could
> affect that, so first I'll ask:
> - are you calling the flac binary or calling into libFLAC?
> - if flac, what is the command-line string?
> - if libFLAC, can you post the calls you are using to set up
> the encoder before initialization?
> - if you do 'flac -a some24bitfile.flac' that you made, are most/all
> of the subframe types VERBATIM?
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
More information about the Flac-dev