pub struct SpatialProcessor { /* private fields */ }Expand description
Main spatial audio processor
Implementations§
Source§impl SpatialProcessor
impl SpatialProcessor
Sourcepub async fn new(config: SpatialConfig) -> Result<Self>
pub async fn new(config: SpatialConfig) -> Result<Self>
Create new spatial processor with configuration
Sourcepub async fn with_memory_config(
config: SpatialConfig,
memory_config: MemoryConfig,
) -> Result<Self>
pub async fn with_memory_config( config: SpatialConfig, memory_config: MemoryConfig, ) -> Result<Self>
Create new spatial processor with spatial and memory configurations
Sourcepub async fn process_request(
&mut self,
request: SpatialRequest,
) -> Result<SpatialResult>
pub async fn process_request( &mut self, request: SpatialRequest, ) -> Result<SpatialResult>
Process spatial audio request
Sourcepub async fn add_sound_source(&self, id: String, source: SoundSource)
pub async fn add_sound_source(&self, id: String, source: SoundSource)
Add sound source
Sourcepub async fn remove_sound_source(&self, id: &str)
pub async fn remove_sound_source(&self, id: &str)
Remove sound source
Sourcepub async fn update_listener(
&self,
position: Position3D,
orientation: (f32, f32, f32),
)
pub async fn update_listener( &self, position: Position3D, orientation: (f32, f32, f32), )
Update listener position and orientation
Sourcepub fn get_stats(&self) -> ProcessingStats
pub fn get_stats(&self) -> ProcessingStats
Get processing statistics
Sourcepub fn memory_manager(&self) -> &Arc<MemoryManager>
pub fn memory_manager(&self) -> &Arc<MemoryManager>
Get memory manager for advanced memory operations
Sourcepub async fn memory_stats(&self) -> MemoryStatistics
pub async fn memory_stats(&self) -> MemoryStatistics
Get memory usage statistics
Sourcepub async fn optimize_memory(&self) -> bool
pub async fn optimize_memory(&self) -> bool
Check for memory pressure and clean up if needed
Auto Trait Implementations§
impl Freeze for SpatialProcessor
impl !RefUnwindSafe for SpatialProcessor
impl Send for SpatialProcessor
impl Sync for SpatialProcessor
impl Unpin for SpatialProcessor
impl UnsafeUnpin for SpatialProcessor
impl !UnwindSafe for SpatialProcessor
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