Struct symphonia_core::sample::i24

source ·
pub struct i24(pub i32);
Expand description

A signed 24-bit integer sample with an internal signed 32-bit integer representation.

There are no guarantees the sample is within the valid range 24-bit range. Use the Sample::clamped function to clamp the sample to the valid range.

Tuple Fields§

§0: i32

Implementations§

source§

impl i24

source

pub const MAX: i24 = _

The largest value that can be represented by this integer type.

source

pub const MIN: i24 = _

The smallest value that can be represented by this integer type..

source

pub fn into_i32(self) -> i32

👎Deprecated: Superseded by inner.

Get the underlying i32 backing this i24.

source

pub fn inner(self) -> i32

Get the underlying i32 backing this i24.

source

pub fn to_ne_bytes(self) -> [u8; 3]

Return the memory representation of this i24 as a byte array in native byte order.

Trait Implementations§

source§

impl Add for i24

§

type Output = i24

The resulting type after applying the + operator.
source§

fn add(self, other: Self) -> Self

Performs the + operation. Read more
source§

impl AddNoise<i24> for RandomNoise

source§

fn add_noise(self, s: i24) -> i24

source§

impl BitAnd for i24

§

type Output = i24

The resulting type after applying the & operator.
source§

fn bitand(self, other: Self) -> Self

Performs the & operation. Read more
source§

impl BitOr for i24

§

type Output = i24

The resulting type after applying the | operator.
source§

fn bitor(self, other: Self) -> Self

Performs the | operation. Read more
source§

impl BitXor for i24

§

type Output = i24

The resulting type after applying the ^ operator.
source§

fn bitxor(self, other: Self) -> Self

Performs the ^ operation. Read more
source§

impl Clone for i24

source§

fn clone(&self) -> i24

Returns a copy 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 Debug for i24

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for i24

source§

fn default() -> i24

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

impl Display for i24

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Div for i24

§

type Output = i24

The resulting type after applying the / operator.
source§

fn div(self, other: Self) -> Self

Performs the / operation. Read more
source§

impl From<i16> for i24

source§

fn from(val: i16) -> Self

Converts to this type from the input type.
source§

impl From<i32> for i24

source§

fn from(val: i32) -> Self

Converts to this type from the input type.
source§

impl From<i8> for i24

source§

fn from(val: i8) -> Self

Converts to this type from the input type.
source§

impl FromSample<f32> for i24

source§

fn from_sample(s: f32) -> Self

source§

impl FromSample<f64> for i24

source§

fn from_sample(s: f64) -> Self

source§

impl FromSample<i16> for i24

source§

fn from_sample(s: i16) -> Self

source§

impl FromSample<i24> for f32

source§

fn from_sample(s: i24) -> Self

source§

impl FromSample<i24> for f64

source§

fn from_sample(s: i24) -> Self

source§

impl FromSample<i24> for i16

source§

fn from_sample(s: i24) -> Self

source§

impl FromSample<i24> for i24

source§

fn from_sample(s: i24) -> Self

source§

impl FromSample<i24> for i32

source§

fn from_sample(s: i24) -> Self

source§

impl FromSample<i24> for i8

source§

fn from_sample(s: i24) -> Self

source§

impl FromSample<i24> for u16

source§

fn from_sample(s: i24) -> Self

source§

impl FromSample<i24> for u24

source§

fn from_sample(s: i24) -> Self

source§

impl FromSample<i24> for u32

source§

fn from_sample(s: i24) -> Self

source§

impl FromSample<i24> for u8

source§

fn from_sample(s: i24) -> Self

source§

impl FromSample<i32> for i24

source§

fn from_sample(s: i32) -> Self

source§

impl FromSample<i8> for i24

source§

fn from_sample(s: i8) -> Self

source§

impl FromSample<u16> for i24

source§

fn from_sample(s: u16) -> Self

source§

impl FromSample<u24> for i24

source§

fn from_sample(s: u24) -> Self

source§

impl FromSample<u32> for i24

source§

fn from_sample(s: u32) -> Self

source§

impl FromSample<u8> for i24

source§

fn from_sample(s: u8) -> Self

source§

impl MaybeDither<f32> for i24

source§

const DITHERABLE: bool = false

source§

fn maybe_dither<D: Dither<i24, f32>>(self, _: &mut D) -> Self

source§

impl MaybeDither<f64> for i24

source§

const DITHERABLE: bool = false

source§

fn maybe_dither<D: Dither<i24, f64>>(self, _: &mut D) -> Self

source§

impl MaybeDither<i16> for i24

source§

const DITHERABLE: bool = true

source§

fn maybe_dither<D: Dither<i24, i16>>(self, dither: &mut D) -> Self

source§

impl MaybeDither<i24> for f32

source§

const DITHERABLE: bool = false

source§

fn maybe_dither<D: Dither<f32, i24>>(self, _: &mut D) -> Self

source§

impl MaybeDither<i24> for f64

source§

const DITHERABLE: bool = false

source§

fn maybe_dither<D: Dither<f64, i24>>(self, _: &mut D) -> Self

source§

impl MaybeDither<i24> for i16

source§

const DITHERABLE: bool = false

source§

fn maybe_dither<D: Dither<i16, i24>>(self, _: &mut D) -> Self

source§

impl MaybeDither<i24> for i24

source§

const DITHERABLE: bool = false

source§

fn maybe_dither<D: Dither<i24, i24>>(self, _: &mut D) -> Self

source§

impl MaybeDither<i24> for i32

source§

const DITHERABLE: bool = true

source§

fn maybe_dither<D: Dither<i32, i24>>(self, dither: &mut D) -> Self

source§

impl MaybeDither<i24> for i8

source§

const DITHERABLE: bool = false

source§

fn maybe_dither<D: Dither<i8, i24>>(self, _: &mut D) -> Self

source§

impl MaybeDither<i24> for u16

source§

const DITHERABLE: bool = false

source§

fn maybe_dither<D: Dither<u16, i24>>(self, _: &mut D) -> Self

source§

impl MaybeDither<i24> for u24

source§

const DITHERABLE: bool = false

source§

fn maybe_dither<D: Dither<u24, i24>>(self, _: &mut D) -> Self

source§

impl MaybeDither<i24> for u32

source§

const DITHERABLE: bool = true

source§

fn maybe_dither<D: Dither<u32, i24>>(self, dither: &mut D) -> Self

source§

impl MaybeDither<i24> for u8

source§

const DITHERABLE: bool = false

source§

fn maybe_dither<D: Dither<u8, i24>>(self, _: &mut D) -> Self

source§

impl MaybeDither<i32> for i24

source§

const DITHERABLE: bool = false

source§

fn maybe_dither<D: Dither<i24, i32>>(self, _: &mut D) -> Self

source§

impl MaybeDither<i8> for i24

source§

const DITHERABLE: bool = true

source§

fn maybe_dither<D: Dither<i24, i8>>(self, dither: &mut D) -> Self

source§

impl MaybeDither<u16> for i24

source§

const DITHERABLE: bool = true

source§

fn maybe_dither<D: Dither<i24, u16>>(self, dither: &mut D) -> Self

source§

impl MaybeDither<u24> for i24

source§

const DITHERABLE: bool = false

source§

fn maybe_dither<D: Dither<i24, u24>>(self, _: &mut D) -> Self

source§

impl MaybeDither<u32> for i24

source§

const DITHERABLE: bool = false

source§

fn maybe_dither<D: Dither<i24, u32>>(self, _: &mut D) -> Self

source§

impl MaybeDither<u8> for i24

source§

const DITHERABLE: bool = true

source§

fn maybe_dither<D: Dither<i24, u8>>(self, dither: &mut D) -> Self

source§

impl Mul for i24

§

type Output = i24

The resulting type after applying the * operator.
source§

fn mul(self, other: Self) -> Self

Performs the * operation. Read more
source§

impl Not for i24

§

type Output = i24

The resulting type after applying the ! operator.
source§

fn not(self) -> Self

Performs the unary ! operation. Read more
source§

impl Ord for i24

source§

fn cmp(&self, other: &i24) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for i24

source§

fn eq(&self, other: &i24) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for i24

source§

fn partial_cmp(&self, other: &i24) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl RawSample for i24

§

type RawType = [u8; 3]

The RawType is a primitive data type, or fixed-size byte array, that is the final binary representation of the sample when written out to a byte-buffer.
source§

fn into_raw_sample(self) -> Self::RawType

source§

impl Rem for i24

§

type Output = i24

The resulting type after applying the % operator.
source§

fn rem(self, other: Self) -> Self

Performs the % operation. Read more
source§

impl Sample for i24

source§

const FORMAT: SampleFormat = SampleFormat::S24

A unique enum value representing the sample format. This constant may be used to dynamically choose how to process the sample at runtime.
source§

const EFF_BITS: u32 = 24u32

The effective number of bits of the valid (clamped) sample range. Quantifies the dynamic range of the sample format in bits.
source§

const MID: i24 = _

The mid-point value between the maximum and minimum sample value. If a sample is set to this value it is silent.
source§

fn clamped(self) -> Self

If the sample format does not use the full range of the underlying data type, returns the sample clamped to the valid range. Otherwise, returns the sample unchanged.
source§

impl Shl<i128> for i24

§

type Output = i24

The resulting type after applying the << operator.
source§

fn shl(self, other: i128) -> i24

Performs the << operation. Read more
source§

impl Shl<i16> for i24

§

type Output = i24

The resulting type after applying the << operator.
source§

fn shl(self, other: i16) -> i24

Performs the << operation. Read more
source§

impl Shl<i32> for i24

§

type Output = i24

The resulting type after applying the << operator.
source§

fn shl(self, other: i32) -> i24

Performs the << operation. Read more
source§

impl Shl<i64> for i24

§

type Output = i24

The resulting type after applying the << operator.
source§

fn shl(self, other: i64) -> i24

Performs the << operation. Read more
source§

impl Shl<i8> for i24

§

type Output = i24

The resulting type after applying the << operator.
source§

fn shl(self, other: i8) -> i24

Performs the << operation. Read more
source§

impl Shl<isize> for i24

§

type Output = i24

The resulting type after applying the << operator.
source§

fn shl(self, other: isize) -> i24

Performs the << operation. Read more
source§

impl Shl<u128> for i24

§

type Output = i24

The resulting type after applying the << operator.
source§

fn shl(self, other: u128) -> i24

Performs the << operation. Read more
source§

impl Shl<u16> for i24

§

type Output = i24

The resulting type after applying the << operator.
source§

fn shl(self, other: u16) -> i24

Performs the << operation. Read more
source§

impl Shl<u32> for i24

§

type Output = i24

The resulting type after applying the << operator.
source§

fn shl(self, other: u32) -> i24

Performs the << operation. Read more
source§

impl Shl<u64> for i24

§

type Output = i24

The resulting type after applying the << operator.
source§

fn shl(self, other: u64) -> i24

Performs the << operation. Read more
source§

impl Shl<u8> for i24

§

type Output = i24

The resulting type after applying the << operator.
source§

fn shl(self, other: u8) -> i24

Performs the << operation. Read more
source§

impl Shl<usize> for i24

§

type Output = i24

The resulting type after applying the << operator.
source§

fn shl(self, other: usize) -> i24

Performs the << operation. Read more
source§

impl Shl for i24

§

type Output = i24

The resulting type after applying the << operator.
source§

fn shl(self, other: Self) -> Self

Performs the << operation. Read more
source§

impl Shr<i128> for i24

§

type Output = i24

The resulting type after applying the >> operator.
source§

fn shr(self, other: i128) -> i24

Performs the >> operation. Read more
source§

impl Shr<i16> for i24

§

type Output = i24

The resulting type after applying the >> operator.
source§

fn shr(self, other: i16) -> i24

Performs the >> operation. Read more
source§

impl Shr<i32> for i24

§

type Output = i24

The resulting type after applying the >> operator.
source§

fn shr(self, other: i32) -> i24

Performs the >> operation. Read more
source§

impl Shr<i64> for i24

§

type Output = i24

The resulting type after applying the >> operator.
source§

fn shr(self, other: i64) -> i24

Performs the >> operation. Read more
source§

impl Shr<i8> for i24

§

type Output = i24

The resulting type after applying the >> operator.
source§

fn shr(self, other: i8) -> i24

Performs the >> operation. Read more
source§

impl Shr<isize> for i24

§

type Output = i24

The resulting type after applying the >> operator.
source§

fn shr(self, other: isize) -> i24

Performs the >> operation. Read more
source§

impl Shr<u128> for i24

§

type Output = i24

The resulting type after applying the >> operator.
source§

fn shr(self, other: u128) -> i24

Performs the >> operation. Read more
source§

impl Shr<u16> for i24

§

type Output = i24

The resulting type after applying the >> operator.
source§

fn shr(self, other: u16) -> i24

Performs the >> operation. Read more
source§

impl Shr<u32> for i24

§

type Output = i24

The resulting type after applying the >> operator.
source§

fn shr(self, other: u32) -> i24

Performs the >> operation. Read more
source§

impl Shr<u64> for i24

§

type Output = i24

The resulting type after applying the >> operator.
source§

fn shr(self, other: u64) -> i24

Performs the >> operation. Read more
source§

impl Shr<u8> for i24

§

type Output = i24

The resulting type after applying the >> operator.
source§

fn shr(self, other: u8) -> i24

Performs the >> operation. Read more
source§

impl Shr<usize> for i24

§

type Output = i24

The resulting type after applying the >> operator.
source§

fn shr(self, other: usize) -> i24

Performs the >> operation. Read more
source§

impl Shr for i24

§

type Output = i24

The resulting type after applying the >> operator.
source§

fn shr(self, other: Self) -> Self

Performs the >> operation. Read more
source§

impl Sub for i24

§

type Output = i24

The resulting type after applying the - operator.
source§

fn sub(self, other: Self) -> Self

Performs the - operation. Read more
source§

impl Copy for i24

source§

impl Eq for i24

source§

impl StructuralPartialEq for i24

Auto Trait Implementations§

§

impl RefUnwindSafe for i24

§

impl Send for i24

§

impl Sync for i24

§

impl Unpin for i24

§

impl UnwindSafe for i24

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> 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<F, T> IntoSample<T> for F
where T: FromSample<F>,

source§

fn into_sample(self) -> T

source§

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

§

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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

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>,

§

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<S> ConvertibleSample for S

source§

impl<S, T> ReversibleSample<S> for T
where T: Sample + FromSample<S> + IntoSample<S>,