Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actualhappytrooper

Posted 30 January 2012 - 06:46 AM

I suspect you're not resetting the parameters at the start of each block. See http://wiki.multimed...osoft_IMA_ADPCM for how it does that for MS ADPCM.


That sounds about right! Thanks for your reply! Although .. I'm having a bit of troubling getting my head around this.. Does this mean I should do the decoding in chunks? Right now I'm applying the decoding algorithm to the entire data:

int decode(int16* dst, const uint8* src, uint srcSize)

where srcSize is the size of the encoded data in bits and my predictedValue and stepIndex continuously follow through to the next nibble-iteration. Do I need to instead do this per block (block align in fmt-chunk?)?

perhaps something like this:
int decode(int16* dst, const uint8* src, int srcOffset, uint srcSize)

where srcOffset is the current offset into the source data?

Thanks in advance!

#1happytrooper

Posted 30 January 2012 - 06:00 AM

I suspect you're not resetting the parameters at the start of each block. See http://wiki.multimed...osoft_IMA_ADPCM for how it does that for MS ADPCM.


That sounds about right! Thanks for your reply! Although .. I'm having a bit of troubling getting my head around this.. Does this mean I should do the decoding in chunks? Right now I'm applying the decoding algorithm to the entire data:

int decode(int16* dst, const uint8* src, uint srcSize)

where srcSize is the size of the encoded data in bits and my predictedValue and stepIndex continuously follow through to the next nibble-iteration. Do I need to instead do this per block (block align in fmt-chunk?)?

perhaps something like this:
int decode(int16* dst, const uint8* src, int srcOffset, uint srcSize)

where srcOffset is the current offSet into the source data?

Thanks in advance!

PARTNERS