Skip to main content

WindowedAudioDecoder

Trait WindowedAudioDecoder 

Source
pub trait WindowedAudioDecoder: Decoder {
    // Required methods
    fn channels(&self) -> usize;
    fn speakers(&self) -> SpeakerLayout;
    fn audio_duration(&self) -> Option<MediaTime>;
}
Expand description

A source’s audio decoder as the windows drive it.

Required Methods§

Source

fn channels(&self) -> usize

Channels of every block it returns.

Source

fn speakers(&self) -> SpeakerLayout

The speaker each channel feeds.

Source

fn audio_duration(&self) -> Option<MediaTime>

Where the source’s audio ends, as the project reads it; None when unknown.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl WindowedAudioDecoder for AudioStream

Available on crate feature engine only.

A stream behind a mix’s audio windows; its blocks hold at most BLOCK_FRAMES samples.