[−][src]Struct dasp::sample::I48
Implementations
impl I48
[src]
pub fn new(val: i64) -> Option<I48>
[src]
Construct a new sample if the given value is within range.
Returns None
if val
is out of range.
pub fn new_unchecked(s: i64) -> I48
[src]
Constructs a new sample without checking for overflowing.
This should only be used if the user can guarantee the sample will be within range and they require the extra performance.
If this function is used, the sample crate can't guarantee that the returned sample or any interacting samples will remain within their MIN and MAX bounds.
pub fn inner(self) -> i64
[src]
Return the internal value used to represent the sample type.
Trait Implementations
impl Add<I48> for I48
[src]
type Output = I48
The resulting type after applying the +
operator.
fn add(self, other: I48) -> I48
[src]
impl BitAnd<I48> for I48
[src]
type Output = I48
The resulting type after applying the &
operator.
fn bitand(self, other: I48) -> I48
[src]
impl BitOr<I48> for I48
[src]
type Output = I48
The resulting type after applying the |
operator.
fn bitor(self, other: I48) -> I48
[src]
impl BitXor<I48> for I48
[src]
type Output = I48
The resulting type after applying the ^
operator.
fn bitxor(self, other: I48) -> I48
[src]
impl Clone for I48
[src]
impl Copy for I48
[src]
impl Debug for I48
[src]
impl Default for I48
[src]
impl Div<I48> for I48
[src]
type Output = I48
The resulting type after applying the /
operator.
fn div(self, other: I48) -> I48
[src]
impl Eq for I48
[src]
impl Frame for I48
[src]
type Sample = I48
The type of PCM sample stored at each channel within the frame.
type NumChannels = N1
A typified version of a number of channels in the Frame
, used for safely mapping frames of the same length to other Frame
s, perhaps with a different Sample
associated type. Read more
type Channels = Channels<I48>
An iterator yielding the sample in each channel, starting from left (channel 0) and ending at the right (channel NumChannels-1). Read more
type Float = <I48 as Sample>::Float
A frame type with equilavent number of channels using the associated Sample::Float
format.
type Signed = <I48 as Sample>::Signed
A frame type with equilavent number of channels using the associated Sample::Signed
format.
const EQUILIBRIUM: I48
[src]
const CHANNELS: usize
[src]
fn channels(self) -> <I48 as Frame>::Channels
[src]
fn channel(&self, idx: usize) -> Option<&<I48 as Frame>::Sample>
[src]
fn from_fn<F>(from: F) -> I48 where
F: FnMut(usize) -> <I48 as Frame>::Sample,
[src]
F: FnMut(usize) -> <I48 as Frame>::Sample,
fn from_samples<I>(samples: &mut I) -> Option<I48> where
I: Iterator<Item = <I48 as Frame>::Sample>,
[src]
I: Iterator<Item = <I48 as Frame>::Sample>,
unsafe fn channel_unchecked(&self, _idx: usize) -> &<I48 as Frame>::Sample
[src]
fn to_signed_frame(self) -> <I48 as Frame>::Signed
[src]
fn to_float_frame(self) -> <I48 as Frame>::Float
[src]
fn map<F, M>(self, map: M) -> F where
F: Frame<NumChannels = <I48 as Frame>::NumChannels>,
M: FnMut(<I48 as Frame>::Sample) -> <F as Frame>::Sample,
[src]
F: Frame<NumChannels = <I48 as Frame>::NumChannels>,
M: FnMut(<I48 as Frame>::Sample) -> <F as Frame>::Sample,
fn zip_map<O, F, M>(self, other: O, zip_map: M) -> F where
F: Frame<NumChannels = <I48 as Frame>::NumChannels>,
M: FnMut(<I48 as Frame>::Sample, <O as Frame>::Sample) -> <F as Frame>::Sample,
O: Frame<NumChannels = <I48 as Frame>::NumChannels>,
[src]
F: Frame<NumChannels = <I48 as Frame>::NumChannels>,
M: FnMut(<I48 as Frame>::Sample, <O as Frame>::Sample) -> <F as Frame>::Sample,
O: Frame<NumChannels = <I48 as Frame>::NumChannels>,
fn scale_amp(self, amp: <I48 as Sample>::Float) -> I48
[src]
fn add_amp<F>(self, other: F) -> I48 where
F: Frame<Sample = <I48 as Sample>::Signed, NumChannels = N1>,
[src]
F: Frame<Sample = <I48 as Sample>::Signed, NumChannels = N1>,
fn offset_amp(self, offset: <Self::Sample as Sample>::Signed) -> Self
[src]
fn mul_amp<F>(self, other: F) -> Self where
F: Frame<Sample = <Self::Sample as Sample>::Float, NumChannels = Self::NumChannels>,
[src]
F: Frame<Sample = <Self::Sample as Sample>::Float, NumChannels = Self::NumChannels>,
impl From<I20> for I48
[src]
impl From<I24> for I48
[src]
impl From<U20> for I48
[src]
impl From<U24> for I48
[src]
impl From<i16> for I48
[src]
impl From<i32> for I48
[src]
impl From<i64> for I48
[src]
impl From<i8> for I48
[src]
impl From<u16> for I48
[src]
impl From<u32> for I48
[src]
impl From<u8> for I48
[src]
impl FromSample<I24> for I48
[src]
fn from_sample_(s: I24) -> I48
[src]
impl FromSample<I48> for u8
[src]
fn from_sample_(s: I48) -> u8
[src]
impl FromSample<I48> for U48
[src]
fn from_sample_(s: I48) -> U48
[src]
impl FromSample<I48> for i32
[src]
fn from_sample_(s: I48) -> i32
[src]
impl FromSample<I48> for f32
[src]
fn from_sample_(s: I48) -> f32
[src]
impl FromSample<I48> for i8
[src]
fn from_sample_(s: I48) -> i8
[src]
impl FromSample<I48> for u16
[src]
fn from_sample_(s: I48) -> u16
[src]
impl FromSample<I48> for i16
[src]
fn from_sample_(s: I48) -> i16
[src]
impl FromSample<I48> for u64
[src]
fn from_sample_(s: I48) -> u64
[src]
impl FromSample<I48> for f64
[src]
fn from_sample_(s: I48) -> f64
[src]
impl FromSample<I48> for I24
[src]
fn from_sample_(s: I48) -> I24
[src]
impl FromSample<I48> for U24
[src]
fn from_sample_(s: I48) -> U24
[src]
impl FromSample<I48> for i64
[src]
fn from_sample_(s: I48) -> i64
[src]
impl FromSample<I48> for u32
[src]
fn from_sample_(s: I48) -> u32
[src]
impl FromSample<U24> for I48
[src]
fn from_sample_(s: U24) -> I48
[src]
impl FromSample<U48> for I48
[src]
fn from_sample_(s: U48) -> I48
[src]
impl FromSample<f32> for I48
[src]
fn from_sample_(s: f32) -> I48
[src]
impl FromSample<f64> for I48
[src]
fn from_sample_(s: f64) -> I48
[src]
impl FromSample<i16> for I48
[src]
fn from_sample_(s: i16) -> I48
[src]
impl FromSample<i32> for I48
[src]
fn from_sample_(s: i32) -> I48
[src]
impl FromSample<i64> for I48
[src]
fn from_sample_(s: i64) -> I48
[src]
impl FromSample<i8> for I48
[src]
fn from_sample_(s: i8) -> I48
[src]
impl FromSample<u16> for I48
[src]
fn from_sample_(s: u16) -> I48
[src]
impl FromSample<u32> for I48
[src]
fn from_sample_(s: u32) -> I48
[src]
impl FromSample<u64> for I48
[src]
fn from_sample_(s: u64) -> I48
[src]
impl FromSample<u8> for I48
[src]
fn from_sample_(s: u8) -> I48
[src]
impl Mul<I48> for I48
[src]
type Output = I48
The resulting type after applying the *
operator.
fn mul(self, other: I48) -> I48
[src]
impl Neg for I48
[src]
impl Not for I48
[src]
impl Ord for I48
[src]
fn cmp(&self, other: &I48) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<I48> for I48
[src]
impl PartialOrd<I48> for I48
[src]
fn partial_cmp(&self, other: &I48) -> Option<Ordering>
[src]
fn lt(&self, other: &I48) -> bool
[src]
fn le(&self, other: &I48) -> bool
[src]
fn gt(&self, other: &I48) -> bool
[src]
fn ge(&self, other: &I48) -> bool
[src]
impl Rem<I48> for I48
[src]
type Output = I48
The resulting type after applying the %
operator.
fn rem(self, other: I48) -> I48
[src]
impl Sample for I48
[src]
type Signed = I48
When summing two samples of a signal together, it is necessary for both samples to be represented in some signed format. This associated Addition
type represents the format to which Self
should be converted for optimal Addition
performance. Read more
type Float = f64
When multiplying two samples of a signal together, it is necessary for both samples to be represented in some signed, floating-point format. This associated Multiplication
type represents the format to which Self
should be converted for optimal Multiplication
performance. Read more
const EQUILIBRIUM: I48
[src]
const IDENTITY: Self::Float
[src]
fn to_sample<S>(self) -> S where
Self: ToSample<S>,
[src]
Self: ToSample<S>,
fn from_sample<S>(s: S) -> Self where
Self: FromSample<S>,
[src]
Self: FromSample<S>,
fn to_signed_sample(self) -> Self::Signed
[src]
fn to_float_sample(self) -> Self::Float
[src]
fn add_amp(self, amp: Self::Signed) -> Self
[src]
fn mul_amp(self, amp: Self::Float) -> Self
[src]
impl Shl<I48> for I48
[src]
type Output = I48
The resulting type after applying the <<
operator.
fn shl(self, other: I48) -> I48
[src]
impl Shr<I48> for I48
[src]
type Output = I48
The resulting type after applying the >>
operator.
fn shr(self, other: I48) -> I48
[src]
impl SignedSample for I48
[src]
impl StructuralEq for I48
[src]
impl StructuralPartialEq for I48
[src]
impl Sub<I48> for I48
[src]
Auto Trait Implementations
impl RefUnwindSafe for I48
impl Send for I48
impl Sync for I48
impl Unpin for I48
impl UnwindSafe for I48
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<S, T> Duplex<S> for T where
T: FromSample<S> + ToSample<S>,
[src]
T: FromSample<S> + ToSample<S>,
impl<T> From<T> for T
[src]
impl<S> FromSample<S> for S
[src]
fn from_sample_(s: S) -> S
[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.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> ToSample<U> for T where
U: FromSample<T>,
[src]
U: FromSample<T>,
fn to_sample_(self) -> U
[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.
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>,