[Flac-dev] Getting subframe type=verbatim on 16 bit files

James Smith jsmith at landmarkdigital.com
Thu Sep 7 16:54:30 PDT 2006


Thanks Josh, 

I made both sides encode and decode use int* and not uint*
And I now send the databuffer in chunks rather than the full song etc all at
once. 

Try to ram a whole song at once seems to always give me the verbatim while
sending chunks seems to have worked.  I'm getting results like the command
line use.

Thanks,

James


On 9/7/06 4:59 PM, "Josh Coalson" <xflac at yahoo.com> wrote:

> --- James Smith <jsmith at landmarkdigital.com> 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 



********************************************
This message is intended only for the use of the Addressee and
may contain information that is PRIVILEGED and CONFIDENTIAL.

If you are not the intended recipient, you are hereby notified
that any dissemination of this communication is strictly prohibited.

If you have received this communication in error, please erase
all copies of the message and its attachments and notify us
immediately.

Thank you.
********************************************


More information about the Flac-dev mailing list