pub struct SmallAudioOptimizer { /* private fields */ }Expand description
Fast-path optimization for small audio samples to reduce memory overhead
Implementations§
Source§impl SmallAudioOptimizer
impl SmallAudioOptimizer
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new small audio optimizer with buffer pooling and caching enabled
Sourcepub fn optimize_small_conversion(
&self,
audio: &[f32],
conversion_type: &ConversionType,
target: &ConversionTarget,
) -> Option<Vec<f32>>
pub fn optimize_small_conversion( &self, audio: &[f32], conversion_type: &ConversionType, target: &ConversionTarget, ) -> Option<Vec<f32>>
Optimize conversion for very small audio samples (< 0.5 seconds)
Sourcepub fn get_pool_stats(&self) -> PoolStats
pub fn get_pool_stats(&self) -> PoolStats
Get buffer pool statistics
Sourcepub fn clear_cache(&self)
pub fn clear_cache(&self)
Clear cache to free memory
Trait Implementations§
Source§impl Debug for SmallAudioOptimizer
impl Debug for SmallAudioOptimizer
Auto Trait Implementations§
impl Freeze for SmallAudioOptimizer
impl RefUnwindSafe for SmallAudioOptimizer
impl Send for SmallAudioOptimizer
impl Sync for SmallAudioOptimizer
impl Unpin for SmallAudioOptimizer
impl UnsafeUnpin for SmallAudioOptimizer
impl UnwindSafe for SmallAudioOptimizer
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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