Struct kira::Frame [−][src]
An audio sample with a left and right channel.
Fields
left: f32
The sample for the left channel.
right: f32
The sample for the right channel.
Implementations
impl Frame
[src]
pub fn new(left: f32, right: f32) -> Self
[src]
Creates a frame with the given left and right values.
pub fn from_mono(value: f32) -> Self
[src]
Creates a frame with both the left and right channels set to the same value.
pub fn from_i32(left: i32, right: i32, bit_depth: u32) -> Self
[src]
Creates a frame from i32
s with the given bit depth.
pub fn panned(self, x: f32) -> Self
[src]
Pans a frame to the left or right.
An x
of 0 represents a hard left panning, an x
of 1
represents a hard right panning.
Trait Implementations
impl Add<Frame> for Frame
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Self::Output
[src]
impl AddAssign<Frame> for Frame
[src]
fn add_assign(&mut self, rhs: Self)
[src]
impl Clone for Frame
[src]
impl Copy for Frame
[src]
impl Debug for Frame
[src]
impl Div<f32> for Frame
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: f32) -> Self::Output
[src]
impl DivAssign<f32> for Frame
[src]
fn div_assign(&mut self, rhs: f32)
[src]
impl Mul<f32> for Frame
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: f32) -> Self::Output
[src]
impl MulAssign<f32> for Frame
[src]
fn mul_assign(&mut self, rhs: f32)
[src]
impl Neg for Frame
[src]
type Output = Self
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl PartialEq<Frame> for Frame
[src]
impl StructuralPartialEq for Frame
[src]
impl Sub<Frame> for Frame
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Self::Output
[src]
impl SubAssign<Frame> for Frame
[src]
fn sub_assign(&mut self, rhs: Self)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,