Skip to main content

encode

Function encode 

Source
pub fn encode(
    frame: &AudioFrame,
    format: AudioFormat,
) -> Result<Bytes, AudioError>
Available on crate feature audio only.
Expand description

Encode an AudioFrame to the target format.

Currently supports WAV and raw PCM16. Other formats return AudioError::Codec.