#[non_exhaustive]pub enum Channel {
Left,
Right,
Center,
LeftSurround,
RightSurround,
Lfe,
Other,
}Expand description
One channel of a multi-channel programme.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Left
Front left.
Right
Front right.
Center
Front center.
LeftSurround
Left surround.
RightSurround
Right surround.
Lfe
Low-frequency effects channel; excluded from loudness sum per BS.1770-4.
Other
Any other channel; treated as unweighted (1.0).
Implementations§
Source§impl Channel
impl Channel
Sourcepub const fn weight(self) -> f32
pub const fn weight(self) -> f32
The channel’s contribution weight in the K-weighted sum, per
BS.1770-4 §4.1. Returns 0.0 for Channel::Lfe.
§Example
use ebur128_stream::Channel;
assert_eq!(Channel::Center.weight(), 1.0);
assert_eq!(Channel::LeftSurround.weight(), 1.41);
assert_eq!(Channel::Lfe.weight(), 0.0); // excludedTrait Implementations§
Source§impl<'de> Deserialize<'de> for Channel
impl<'de> Deserialize<'de> for Channel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Channel
impl Eq for Channel
impl StructuralPartialEq for Channel
Auto Trait Implementations§
impl Freeze for Channel
impl RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl UnsafeUnpin for Channel
impl UnwindSafe for Channel
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