pub struct Stereo {
pub left: SampleT,
pub right: SampleT,
}Expand description
Struct representing a stereophonic audio sample.
Fields§
§left: SampleTLeft sample value.
right: SampleTRight sample value.
Implementations§
Trait Implementations§
Source§impl AddAssign for Stereo
impl AddAssign for Stereo
Source§fn add_assign(&mut self, rhs: Stereo)
fn add_assign(&mut self, rhs: Stereo)
Performs the
+= operation. Read moreSource§impl MulAssign<f32> for Stereo
impl MulAssign<f32> for Stereo
Source§fn mul_assign(&mut self, rhs: SampleT)
fn mul_assign(&mut self, rhs: SampleT)
Performs the
*= operation. Read moreSource§impl MulAssign<f64> for Stereo
impl MulAssign<f64> for Stereo
Source§fn mul_assign(&mut self, rhs: MathT)
fn mul_assign(&mut self, rhs: MathT)
Performs the
*= operation. Read moreSource§impl MulAssign for Stereo
impl MulAssign for Stereo
Source§fn mul_assign(&mut self, rhs: Stereo)
fn mul_assign(&mut self, rhs: Stereo)
Performs the
*= operation. Read moreSource§impl Panner<f32> for Stereo
Pans a given sample between the left and right channels. The panning
parameter g is a floating point value of the rang [-1,1], where -1 is
panned full left and 1 is panned full right. If the given value is not
within this range, it is clamped to it.
impl Panner<f32> for Stereo
Pans a given sample between the left and right channels. The panning
parameter g is a floating point value of the rang [-1,1], where -1 is
panned full left and 1 is panned full right. If the given value is not
within this range, it is clamped to it.
Source§fn to_sample_format(s: SampleT, g: f32) -> Self
fn to_sample_format(s: SampleT, g: f32) -> Self
Converts the monophonic sample into a polyphonic sample.
Source§impl Panner<f64> for Stereo
impl Panner<f64> for Stereo
Source§fn to_sample_format(s: SampleT, g: f64) -> Self
fn to_sample_format(s: SampleT, g: f64) -> Self
Converts the monophonic sample into a polyphonic sample.
Source§impl SampleFormat for Stereo
impl SampleFormat for Stereo
Source§fn from_sample(x: SampleT) -> Self
fn from_sample(x: SampleT) -> Self
Creates an object from a single monophonic sample.
Source§fn into_sample(self) -> SampleT
fn into_sample(self) -> SampleT
Converts the given polyphonic sample to a monophonic sample.
Source§fn num_samples() -> usize
fn num_samples() -> usize
Returns the number of
SampleT values held within a given
SampleFormat. A common use for this would be for ensuring Vecs
given to try_from have the correct size.Source§impl SubAssign for Stereo
impl SubAssign for Stereo
Source§fn sub_assign(&mut self, rhs: Stereo)
fn sub_assign(&mut self, rhs: Stereo)
Performs the
-= operation. Read moreimpl Copy for Stereo
Auto Trait Implementations§
impl Freeze for Stereo
impl RefUnwindSafe for Stereo
impl Send for Stereo
impl Sync for Stereo
impl Unpin for Stereo
impl UnsafeUnpin for Stereo
impl UnwindSafe for Stereo
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