Function decode_adpcm_ima

Source
pub fn decode_adpcm_ima(encoded_nibble: u8, state: &mut AdpcmImaState) -> i16
Expand description

Decodes a 4-bit encoded IMA ADPCM value to a linear 16-bit signed integer sample value.

Only the lowest 4 bits of encoded_nibble are used and the top-most bits are ignored.

The state parameter should be initialized to zero or to values from the audio stream (depending on how the format has specified it). This method updates state with new values. Subsequent calls should pass in the state values from the previous call.