pub struct FlacBuilder<'data, Sample>where
Sample: IntoSample,{ /* private fields */ }Implementations§
Source§impl<'data, Sample: IntoSample> FlacBuilder<'data, Sample>
impl<'data, Sample: IntoSample> FlacBuilder<'data, Sample>
Sourcepub fn from_planar(data: &'data [Vec<Sample>], sample_rate: u32) -> Self
pub fn from_planar(data: &'data [Vec<Sample>], sample_rate: u32) -> Self
New with planar audio data. The input data must be a list of channels where each channel is
a list of frames/samples. Samples can be either f32 or f64 in range [-1.0, 1.0] or
anything you implement IntoSample on.
Sourcepub fn from_interleaved(
data: &'data [Sample],
channels: usize,
sample_rate: u32,
) -> Self
pub fn from_interleaved( data: &'data [Sample], channels: usize, sample_rate: u32, ) -> Self
New with interleaved (e.g. LRLRLRLRLRLR) audio data. Samples can be either f32 or f64
in range [-1.0, 1.0] or anything you implement IntoSample on.
Sourcepub fn compression_level(self, level: u32) -> Self
pub fn compression_level(self, level: u32) -> Self
See here.
pub fn padding(self, padding: u32) -> Self
pub fn artist(self, artist: &str) -> Self
pub fn album(self, album: &str) -> Self
pub fn title(self, title: &str) -> Self
pub fn year(self, year: u32) -> Self
pub fn track_number(self, number: i32) -> Self
pub fn vorbis_comment(self, key: &str, value: &str) -> Self
pub fn write_file(self, path: impl AsRef<Path>) -> Result<(), EncoderError>
pub fn build(self) -> Result<Vec<u8>, EncoderError>
Trait Implementations§
Source§impl<'data, Sample: IntoSample> Drop for FlacBuilder<'data, Sample>
impl<'data, Sample: IntoSample> Drop for FlacBuilder<'data, Sample>
Auto Trait Implementations§
impl<'data, Sample> Freeze for FlacBuilder<'data, Sample>
impl<'data, Sample> RefUnwindSafe for FlacBuilder<'data, Sample>where
Sample: RefUnwindSafe,
impl<'data, Sample> !Send for FlacBuilder<'data, Sample>
impl<'data, Sample> !Sync for FlacBuilder<'data, Sample>
impl<'data, Sample> Unpin for FlacBuilder<'data, Sample>
impl<'data, Sample> UnwindSafe for FlacBuilder<'data, Sample>where
Sample: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more