[−][src]Function x3::encoder::encode_frame
pub fn encode_frame(
wav: &[i16],
last_wav: &mut i16,
bp: &mut BitPacker<'_>,
params: &Parameters,
stats: &mut [usize; 6]
) -> Result<(), X3Error>
Encode one frame and all it's blocks. This takes the wav and converts it x3 compressed audio.
Arguments
wav
- the raw audio data.last_wav
- the last wav value from the previous frame.bp
- Where the output x3 compressed bits will be written to.params
- The audio parameters.stats
- Used for statistics which get printed out at the end.