pub struct AudioExporter;Expand description
Audio exporter utility
This struct provides methods for exporting decoded audio data to various formats.
Implementations§
Source§impl AudioExporter
impl AudioExporter
Sourcepub fn export_wav<P: AsRef<Path>>(audio: &DecodedAudio, path: P) -> Result<()>
pub fn export_wav<P: AsRef<Path>>(audio: &DecodedAudio, path: P) -> Result<()>
Export audio as WAV file
This is the most common export format, providing uncompressed audio with full quality preservation.
Sourcepub fn export_raw_pcm<P: AsRef<Path>>(
audio: &DecodedAudio,
path: P,
bit_depth: u8,
) -> Result<()>
pub fn export_raw_pcm<P: AsRef<Path>>( audio: &DecodedAudio, path: P, bit_depth: u8, ) -> Result<()>
Export audio as raw PCM data
Sourcepub fn export_auto<P: AsRef<Path>>(audio: &DecodedAudio, path: P) -> Result<()>
pub fn export_auto<P: AsRef<Path>>(audio: &DecodedAudio, path: P) -> Result<()>
Export audio with automatic format detection based on file extension
Sourcepub fn supported_formats() -> Vec<&'static str>
pub fn supported_formats() -> Vec<&'static str>
Get supported export formats
Sourcepub fn is_format_supported(extension: &str) -> bool
pub fn is_format_supported(extension: &str) -> bool
Check if a format is supported for export
Sourcepub fn create_filename(base_name: &str, format: &str) -> String
pub fn create_filename(base_name: &str, format: &str) -> String
Create a filename with the given base name and format extension
Sourcepub fn validate_for_export(audio: &DecodedAudio) -> Result<()>
pub fn validate_for_export(audio: &DecodedAudio) -> Result<()>
Validate that the audio has valid properties for export
Sourcepub fn export_validated<P: AsRef<Path>>(
audio: &DecodedAudio,
path: P,
) -> Result<()>
pub fn export_validated<P: AsRef<Path>>( audio: &DecodedAudio, path: P, ) -> Result<()>
Export with validation
Auto Trait Implementations§
impl Freeze for AudioExporter
impl RefUnwindSafe for AudioExporter
impl Send for AudioExporter
impl Sync for AudioExporter
impl Unpin for AudioExporter
impl UnwindSafe for AudioExporter
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more