[Flac-dev] Re: Reg. FLAC decoding
Josh Coalson
xflac at yahoo.com
Thu Oct 6 10:10:34 PDT 2005
--- Joe Steeve <joesteeve at zodiactorp.com> wrote:
> On Fri, 2005-09-30 at 23:14, Josh Coalson wrote:
> > but all samples in buffer[] are 32-bit signed integers in host
> > order, regardless of the bits-per-sample of the frame. so to get
> > them down to shorts (assuming they'll fit), do like:
> >
> > FLAC__int32 * LChannel = buffer[0];
> > short TempSource = (short)LChannel[LPos];
> >
> > instead of
> >
> > LChannel = (unsigned char *)buffer[0];
> > short * TempSource = (short *)&LChannel[LPos];
>
> > let me know if this works or if you have other questions.
>
> I tried this., but still i dont get the proper output. I'm still
> debugging with the decoder. I'll get back when I get doubts.
one thing that can help: create a stereo WAVE file with one
sample in each channel with a specific bit pattern like
0x55aa 0x5aa5, compress to FLAC, and decode that. then it is
easy in a debugger to see how the samples are stored.
Josh
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
More information about the Flac-dev
mailing list