pub struct Frame {
    pub left: f32,
    pub right: f32,
}Expand description
A stereo audio sample.
Fields§
§left: f32The sample for the left channel.
right: f32The sample for the right channel.
Implementations§
Source§impl Frame
 
impl Frame
Sourcepub fn new(left: f32, right: f32) -> Frame
 
pub fn new(left: f32, right: f32) -> Frame
Creates a frame with the given left and right values.
Sourcepub fn from_mono(value: f32) -> Frame
 
pub fn from_mono(value: f32) -> Frame
Creates a frame with both the left and right channels set to the same value.
Trait Implementations§
Source§impl AddAssign for Frame
 
impl AddAssign for Frame
Source§fn add_assign(&mut self, rhs: Frame)
 
fn add_assign(&mut self, rhs: Frame)
Performs the 
+= operation. Read moreSource§impl DivAssign<f32> for Frame
 
impl DivAssign<f32> for Frame
Source§fn div_assign(&mut self, rhs: f32)
 
fn div_assign(&mut self, rhs: f32)
Performs the 
/= operation. Read moreSource§impl MulAssign<f32> for Frame
 
impl MulAssign<f32> for Frame
Source§fn mul_assign(&mut self, rhs: f32)
 
fn mul_assign(&mut self, rhs: f32)
Performs the 
*= operation. Read moreSource§impl SubAssign for Frame
 
impl SubAssign for Frame
Source§fn sub_assign(&mut self, rhs: Frame)
 
fn sub_assign(&mut self, rhs: Frame)
Performs the 
-= operation. Read moreimpl Copy for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
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> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<S> FromSample<S> for S
 
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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