Struct vorbis_enc::OggVorbisEncoder
[−]
[src]
pub struct OggVorbisEncoder { // some fields omitted }
Implementation of a file based ogg-vorbis audio encoder.
Methods
impl OggVorbisEncoder
fn new(filename: &str) -> Result<OggVorbisEncoder, Error>
Creates a audio stream with the specified output file.
fn initialize(&mut self, channels: usize, sample_rate: u32, nominal_bitrate: u32, min_bitrate: Option<u32>, max_bitrate: Option<u32>) -> Result<(), String>
Initializes the audio stream for encoding with a pre-defined bitrate configuration.
fn initialize_with_vbr(&mut self, channels: usize, sample_rate: u32, quality: f32) -> Result<(), String>
Initializes the audio stream with variable bitrate encoding.
fn write_samples(&mut self, samples: &[i16]) -> Result<(), String>
Writes the samples
into the audio stream.
fn close(&mut self) -> Result<(), String>
Closes the audio stream.
fn len(&self) -> usize
Returns the number of bytes written into the output file.