--- James Smith <[EMAIL PROTECTED]> wrote:
>     switch(bitsPerSample)
>     {
>             
>         case SIXTEEN_BITS:
>             buffer16 = (uint16_t*)inData.GetData(); // so we index
thru out data in 16 byte chunks
>             for(sample = sample32 = 0; sample32 < numFrames;
sample32++)
>             {
>                 for(channel = 0; channel < numChannels; channel++,
sample++)
>                 {
>                     flacBuffer[channel][sample32] =
(uint32_t)(uint16_t)buffer16[sample];

that last line there ^^^ looks fishy.  flac takes *signed* 32 PCM
samples.  so the cast is wrong.  also if your data really is
unsigned 16-bit then you have to subtract 32768 from each sample.

Josh


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
Flac-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/flac-dev

Reply via email to