pub struct I48(/* private fields */);
Implementations§
source§impl I48
impl I48
sourcepub fn new(val: i64) -> Option<I48>
pub fn new(val: i64) -> Option<I48>
Construct a new sample if the given value is within range.
Returns None
if val
is out of range.
sourcepub fn new_unchecked(s: i64) -> I48
pub fn new_unchecked(s: i64) -> I48
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.
Trait Implementations§
source§impl FromSample<I24> for I48
impl FromSample<I24> for I48
fn from_sample_(s: I24) -> I48
source§impl FromSample<I48> for I24
impl FromSample<I48> for I24
fn from_sample_(s: I48) -> I24
source§impl FromSample<I48> for U24
impl FromSample<I48> for U24
fn from_sample_(s: I48) -> U24
source§impl FromSample<I48> for U48
impl FromSample<I48> for U48
fn from_sample_(s: I48) -> U48
source§impl FromSample<I48> for f32
impl FromSample<I48> for f32
fn from_sample_(s: I48) -> f32
source§impl FromSample<I48> for f64
impl FromSample<I48> for f64
fn from_sample_(s: I48) -> f64
source§impl FromSample<I48> for i16
impl FromSample<I48> for i16
fn from_sample_(s: I48) -> i16
source§impl FromSample<I48> for i32
impl FromSample<I48> for i32
fn from_sample_(s: I48) -> i32
source§impl FromSample<I48> for i64
impl FromSample<I48> for i64
fn from_sample_(s: I48) -> i64
source§impl FromSample<I48> for i8
impl FromSample<I48> for i8
fn from_sample_(s: I48) -> i8
source§impl FromSample<I48> for u16
impl FromSample<I48> for u16
fn from_sample_(s: I48) -> u16
source§impl FromSample<I48> for u32
impl FromSample<I48> for u32
fn from_sample_(s: I48) -> u32
source§impl FromSample<I48> for u64
impl FromSample<I48> for u64
fn from_sample_(s: I48) -> u64
source§impl FromSample<I48> for u8
impl FromSample<I48> for u8
fn from_sample_(s: I48) -> u8
source§impl FromSample<U24> for I48
impl FromSample<U24> for I48
fn from_sample_(s: U24) -> I48
source§impl FromSample<U48> for I48
impl FromSample<U48> for I48
fn from_sample_(s: U48) -> I48
source§impl FromSample<f32> for I48
impl FromSample<f32> for I48
fn from_sample_(s: f32) -> I48
source§impl FromSample<f64> for I48
impl FromSample<f64> for I48
fn from_sample_(s: f64) -> I48
source§impl FromSample<i16> for I48
impl FromSample<i16> for I48
fn from_sample_(s: i16) -> I48
source§impl FromSample<i32> for I48
impl FromSample<i32> for I48
fn from_sample_(s: i32) -> I48
source§impl FromSample<i64> for I48
impl FromSample<i64> for I48
fn from_sample_(s: i64) -> I48
source§impl FromSample<i8> for I48
impl FromSample<i8> for I48
fn from_sample_(s: i8) -> I48
source§impl FromSample<u16> for I48
impl FromSample<u16> for I48
fn from_sample_(s: u16) -> I48
source§impl FromSample<u32> for I48
impl FromSample<u32> for I48
fn from_sample_(s: u32) -> I48
source§impl FromSample<u64> for I48
impl FromSample<u64> for I48
fn from_sample_(s: u64) -> I48
source§impl FromSample<u8> for I48
impl FromSample<u8> for I48
fn from_sample_(s: u8) -> I48
source§impl Ord for I48
impl Ord for I48
source§impl PartialOrd for I48
impl PartialOrd for I48
source§impl Sample for I48
impl Sample for I48
source§type Signed = I48
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 moresource§type Float = f64
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 moresource§const EQUILIBRIUM: I48 = types::i48::EQUILIBRIUM
const EQUILIBRIUM: I48 = types::i48::EQUILIBRIUM
The equilibrium value for the wave that this
Sample
type represents. This is normally the
value that is equal distance from both the min and max ranges of the sample. Read moresource§const IDENTITY: Self::Float = <Self::Float as FloatSample>::IDENTITY
const IDENTITY: Self::Float = <Self::Float as FloatSample>::IDENTITY
The multiplicative identity of the signal. Read more
source§fn from_sample<S>(s: S) -> Selfwhere
Self: FromSample<S>,
fn from_sample<S>(s: S) -> Selfwhere
Self: FromSample<S>,
source§fn to_signed_sample(self) -> Self::Signed
fn to_signed_sample(self) -> Self::Signed
source§fn to_float_sample(self) -> Self::Float
fn to_float_sample(self) -> Self::Float
impl Copy for I48
impl Eq for I48
impl SignedSample for I48
impl StructuralPartialEq for I48
Auto Trait Implementations§
impl Freeze for I48
impl RefUnwindSafe for I48
impl Send for I48
impl Sync for I48
impl Unpin for I48
impl UnwindSafe for I48
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)