pub struct SpatialCompressor { /* private fields */ }Expand description
Spatial audio compressor
Implementations§
Source§impl SpatialCompressor
impl SpatialCompressor
Sourcepub fn new(config: SpatialCompressionConfig) -> Result<Self>
pub fn new(config: SpatialCompressionConfig) -> Result<Self>
Create a new spatial compressor
Sourcepub fn compress_frame(
&mut self,
audio_data: &Array2<f32>,
spatial_metadata: &SpatialMetadata,
) -> Result<CompressedFrame>
pub fn compress_frame( &mut self, audio_data: &Array2<f32>, spatial_metadata: &SpatialMetadata, ) -> Result<CompressedFrame>
Compress a frame of spatial audio
Sourcepub fn config(&self) -> &SpatialCompressionConfig
pub fn config(&self) -> &SpatialCompressionConfig
Get current configuration
Sourcepub fn get_stats(&self) -> Option<CompressionStats>
pub fn get_stats(&self) -> Option<CompressionStats>
Get compression statistics for the last frame
Auto Trait Implementations§
impl Freeze for SpatialCompressor
impl RefUnwindSafe for SpatialCompressor
impl Send for SpatialCompressor
impl Sync for SpatialCompressor
impl Unpin for SpatialCompressor
impl UnsafeUnpin for SpatialCompressor
impl UnwindSafe for SpatialCompressor
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