Skip to main content

Mono

Struct Mono 

Source
pub struct Mono {
    pub mono: SampleT,
}
Expand description

Struct representing a monophonic audio sample.

Fields§

§mono: SampleT

The single, monophonic sample.

Implementations§

Source§

impl Mono

Source

pub fn new() -> Self

Creates a new Mono object with a default value of 0.

Source

pub fn from(s: SampleT) -> Self

Creates a new Mono object from the given sample value.

Trait Implementations§

Source§

impl Add for Mono

Source§

type Output = Mono

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Mono) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign for Mono

Source§

fn add_assign(&mut self, rhs: Mono)

Performs the += operation. Read more
Source§

impl Clone for Mono

Source§

fn clone(&self) -> Mono

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Mono

Source§

fn default() -> Mono

Returns the “default value” for a type. Read more
Source§

impl From<f32> for Mono

Source§

fn from(s: SampleT) -> Self

Converts to this type from the input type.
Source§

impl Into<Vec<i16>> for Mono

Source§

fn into(self) -> Vec<i16>

Converts this type into the (usually inferred) input type.
Source§

impl Into<Vec<i32>> for Mono

Source§

fn into(self) -> Vec<i32>

Converts this type into the (usually inferred) input type.
Source§

impl Into<Vec<u8>> for Mono

Source§

fn into(self) -> Vec<u8>

Converts this type into the (usually inferred) input type.
Source§

impl Into<f32> for Mono

Source§

fn into(self) -> SampleT

Converts this type into the (usually inferred) input type.
Source§

impl Mul<f32> for Mono

Source§

type Output = Mono

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: SampleT) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<f64> for Mono

Source§

type Output = Mono

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: MathT) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul for Mono

Source§

type Output = Mono

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Mono) -> Self::Output

Performs the * operation. Read more
Source§

impl MulAssign<f32> for Mono

Source§

fn mul_assign(&mut self, rhs: SampleT)

Performs the *= operation. Read more
Source§

impl MulAssign<f64> for Mono

Source§

fn mul_assign(&mut self, rhs: MathT)

Performs the *= operation. Read more
Source§

impl MulAssign for Mono

Source§

fn mul_assign(&mut self, rhs: Mono)

Performs the *= operation. Read more
Source§

impl Neg for Mono

Source§

type Output = Mono

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T> Panner<T> for Mono

Source§

fn to_sample_format(s: SampleT, _: T) -> Self

Converts the monophonic sample into a polyphonic sample.
Source§

impl SampleFormat for Mono

Source§

fn from_sample(x: SampleT) -> Self

Creates an object from a single monophonic sample.
Source§

fn into_sample(self) -> SampleT

Converts the given polyphonic sample to a monophonic sample.
Source§

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 Sub for Mono

Source§

type Output = Mono

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Mono) -> Self

Performs the - operation. Read more
Source§

impl SubAssign for Mono

Source§

fn sub_assign(&mut self, rhs: Mono)

Performs the -= operation. Read more
Source§

impl TryFrom<Vec<i16>> for Mono

Source§

type Error = String

The type returned in the event of a conversion error.
Source§

fn try_from(v: Vec<i16>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Vec<i32>> for Mono

Source§

type Error = String

The type returned in the event of a conversion error.
Source§

fn try_from(v: Vec<i32>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Vec<u8>> for Mono

Source§

type Error = String

The type returned in the event of a conversion error.
Source§

fn try_from(v: Vec<u8>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Copy for Mono

Auto Trait Implementations§

§

impl Freeze for Mono

§

impl RefUnwindSafe for Mono

§

impl Send for Mono

§

impl Sync for Mono

§

impl Unpin for Mono

§

impl UnsafeUnpin for Mono

§

impl UnwindSafe for Mono

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V