AudioWriter

Trait AudioWriter 

Source
pub trait AudioWriter<W>: Sized
where W: Write + Seek,
{ // Required methods fn new(writer: W, spec: AudioSpec) -> Result<Self> where Self: Sized; fn write(&mut self, sample: f32) -> Result<()> where Self: Sized; fn finalize(self) -> Result<()> where Self: Sized; // Provided method fn write_into_channels(&mut self, channels: Vec<Vec<f32>>) -> Result<()> { ... } }

Required Methods§

Source

fn new(writer: W, spec: AudioSpec) -> Result<Self>
where Self: Sized,

Source

fn write(&mut self, sample: f32) -> Result<()>
where Self: Sized,

Source

fn finalize(self) -> Result<()>
where Self: Sized,

Provided Methods§

Source

fn write_into_channels(&mut self, channels: Vec<Vec<f32>>) -> Result<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<W> AudioWriter<W> for WavWriter<W>
where W: Write + Seek,