/// Integrate over all differences to the previous value in order to reconstruct sample values.
Integrate over all differences to the previous value in order to reconstruct sample values.
Integrate over all differences to the previous value in order to reconstruct sample values .
pub fn differences_to_samples(buffer: &mut [u8]){
        for index in 1..buffer.len() {
            buffer[index] = (buffer[index - 1] as i32 + buffer[index] as i32 - 128) as u8; // index unsafe but handled with care and unit-tested
        }
    }
pub fn differences_to_samples ( buffer : & mut [ u8 ] ) { for index in 1 .. buffer . len ( ) { buffer [ index ] = ( buffer [ index - 1 ] as i32 + buffer [ index ] as i32 - 128 ) as u8 ; // index unsafe but handled with care and unit-tested } }
Integrate over all differences to the previous value in order to reconstruct sample values.
Integrate over all differences to the previous value in order to reconstruct sample values .
buffer
&mut [u8]