Skip to main content

AudioProcessorSession

Trait AudioProcessorSession 

Source
pub trait AudioProcessorSession: Send {
    // Required methods
    fn name(&self) -> &str;
    fn capabilities(&self) -> AudioProcessorCapabilities;
    fn process(
        &mut self,
        frame: DecoderPcmFrame,
    ) -> Result<DecoderPcmFrame, AudioProcessorError>;
    fn flush(&mut self) -> Result<(), AudioProcessorError>;
    fn close(&mut self) -> Result<(), AudioProcessorError>;

    // Provided methods
    fn session_info(&self) -> AudioProcessorSessionInfo { ... }
    fn configure(
        &mut self,
        _policy: AudioPlaybackPolicy,
    ) -> Result<(), AudioProcessorError> { ... }
}

Required Methods§

Source

fn name(&self) -> &str

Source

fn capabilities(&self) -> AudioProcessorCapabilities

Source

fn process( &mut self, frame: DecoderPcmFrame, ) -> Result<DecoderPcmFrame, AudioProcessorError>

Processes one PCM frame while preserving the host-owned PTS and discontinuity marker.

Source

fn flush(&mut self) -> Result<(), AudioProcessorError>

Source

fn close(&mut self) -> Result<(), AudioProcessorError>

Provided Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§