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!