DecoderWorkpad

A note on workpads: Dynamic decode functions use 16 bytes of workpad, consisting of 4 32 bit integers, which is the recommended initialization method to avoid misaligned integers. For looping an audio sample, you need to back up the workpad at the start of the loop, monitor the third integer (which is the position), then replace the current workpad's data with the backed up one. This is extremly important with ADPCM as they depend on many local values. Dynamic encode functions use 32 bytes. In these cases, the 3rd and 6th integers need to be set to zero if working on a fixed length buffer. Functions meant to be used on a fixed length buffer coming soon.

None of the functions depend on external libraries or functions, and require no garbage collection.

Constructors

this
this(uint position, int stepIndex, int x_nMinusOne)
Undocumented in source.

Members

Variables

position
uint position;

Data offset in samples

predictor
int predictor;

unused

stepIndex
int stepIndex;

ADPCM: current position on the steptable of the codec

x_nMinusOne
int x_nMinusOne;

Previous outputted sample

Meta