pub struct SpeakerLayout { /* private fields */ }Expand description
The speakers an AudioBlock’s planes feed, in plane order: 1 to
MAX_AUDIO_CHANNELS of them.
A provider reports the layout its source declares (a WAVE channel mask, a
QuickTime chan box, a codec’s channel configuration), in the order its
planes arrive; neither binding rematrixes a source into another layout.
A source that declares none, or only channels no speaker names, has
SpeakerLayout::default_for its channel count.
Implementations§
Source§impl SpeakerLayout
impl SpeakerLayout
Sourcepub fn new(speakers: &[Speaker]) -> Option<Self>
pub fn new(speakers: &[Speaker]) -> Option<Self>
The layout of these speakers in this plane order, or None for none
or more than MAX_AUDIO_CHANNELS.
Sourcepub fn default_for(channels: usize) -> Option<Self>
pub fn default_for(channels: usize) -> Option<Self>
The layout a source of channels planes that declares none has:
FFmpeg’s default for the count (av_channel_layout_default), in the
WAVE order. Mono, stereo, 2.1, 4.0, 5.0, 5.1, 6.1 and 7.1 up to 8;
5.1.4, 7.1.4, 9.1.4, 9.1.6 and 22.2 for 10, 12, 14, 16 and 24. A count
FFmpeg names no layout for is a 7.1 with its further channels
unnamed. None for no channels or more than MAX_AUDIO_CHANNELS.
Sourcepub fn declared_or_default(speakers: &[Speaker]) -> Option<(Self, bool)>
pub fn declared_or_default(speakers: &[Speaker]) -> Option<(Self, bool)>
The layout a source declares, or SpeakerLayout::default_for its
channel count when it names no speaker at all. The flag says the
default was assumed.