Struct dsp::sample::I24
[−]
pub struct I24(_);
Methods
impl I24
fn new(val: i32) -> Option<I24>
Construct a new sample if the given value is within range.
Returns None
if val
is out of range.
fn new_unchecked(s: i32) -> I24
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.
fn inner(self) -> i32
Return the internal value used to represent the sample type.
Trait Implementations
impl Default for I24
impl Ord for I24
impl PartialOrd<I24> for I24
fn partial_cmp(&self, __arg_0: &I24) -> Option<Ordering>
fn lt(&self, __arg_0: &I24) -> bool
fn le(&self, __arg_0: &I24) -> bool
fn gt(&self, __arg_0: &I24) -> bool
fn ge(&self, __arg_0: &I24) -> bool
impl Eq for I24
impl PartialEq<I24> for I24
fn eq(&self, __arg_0: &I24) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &I24) -> bool
This method tests for !=
.
impl Debug for I24
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl Clone for I24
fn clone(&self) -> I24
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for I24
impl From<i32> for I24
impl Add<I24> for I24
impl Sub<I24> for I24
impl Mul<I24> for I24
impl Div<I24> for I24
impl Not for I24
impl Rem<I24> for I24
impl Shl<I24> for I24
impl Shr<I24> for I24
impl BitAnd<I24> for I24
impl BitOr<I24> for I24
impl BitXor<I24> for I24
impl From<i8> for I24
impl From<i16> for I24
impl From<I20> for I24
impl From<u8> for I24
impl From<u16> for I24
impl From<U20> for I24
impl Neg for I24
impl FromSample<i8> for I24
fn from_sample_(s: i8) -> I24
impl FromSample<i16> for I24
fn from_sample_(s: i16) -> I24
impl FromSample<i32> for I24
fn from_sample_(s: i32) -> I24
impl FromSample<I48> for I24
fn from_sample_(s: I48) -> I24
impl FromSample<i64> for I24
fn from_sample_(s: i64) -> I24
impl FromSample<u8> for I24
fn from_sample_(s: u8) -> I24
impl FromSample<u16> for I24
fn from_sample_(s: u16) -> I24
impl FromSample<U24> for I24
fn from_sample_(s: U24) -> I24
impl FromSample<u32> for I24
fn from_sample_(s: u32) -> I24
impl FromSample<U48> for I24
fn from_sample_(s: U48) -> I24
impl FromSample<u64> for I24
fn from_sample_(s: u64) -> I24
impl FromSample<f32> for I24
fn from_sample_(s: f32) -> I24
impl FromSample<f64> for I24
fn from_sample_(s: f64) -> I24
impl Sample for I24
fn equilibrium() -> I24
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 more
fn to_sample<S>(self) -> S where Self: ToSample<S>
Convert self
to any type that implements FromSample
.
fn from_sample<S>(s: S) -> Self where Self: FromSample<S>
Create a Self
from any type that implements ToSample
.