Enum rtaudio::SampleFormat
source · #[repr(usize)]pub enum SampleFormat {
SInt8 = 1,
SInt16 = 2,
SInt24 = 4,
SInt32 = 8,
Float32 = 16,
Float64 = 32,
}
Expand description
The sample format type.
Support for signed integers and floats. Audio data fed to/from an RtAudio stream is assumed to ALWAYS be in host byte order. The internal routines will automatically take care of any necessary byte-swapping between the host format and the soundcard. Thus, endian-ness is not a concern in the following format definitions.
Variants§
SInt8 = 1
8-bit signed integer.
SInt16 = 2
16-bit signed integer.
SInt24 = 4
24-bit signed integer.
The endianness will always be in the host’s native byte order.
SInt32 = 8
32-bit signed integer.
Float32 = 16
32-bit floating point number, normalized between plus/minus 1.0.
Float64 = 32
64-bit floating point number, normalized between plus/minus 1.0.
Implementations§
source§impl SampleFormat
impl SampleFormat
pub fn to_raw(&self) -> rtaudio_format_t
Trait Implementations§
source§impl Clone for SampleFormat
impl Clone for SampleFormat
source§fn clone(&self) -> SampleFormat
fn clone(&self) -> SampleFormat
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SampleFormat
impl Debug for SampleFormat
source§impl Default for SampleFormat
impl Default for SampleFormat
source§impl Ord for SampleFormat
impl Ord for SampleFormat
source§fn cmp(&self, other: &SampleFormat) -> Ordering
fn cmp(&self, other: &SampleFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for SampleFormat
impl PartialEq for SampleFormat
source§fn eq(&self, other: &SampleFormat) -> bool
fn eq(&self, other: &SampleFormat) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SampleFormat
impl PartialOrd for SampleFormat
source§fn partial_cmp(&self, other: &SampleFormat) -> Option<Ordering>
fn partial_cmp(&self, other: &SampleFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moreimpl Copy for SampleFormat
impl Eq for SampleFormat
impl StructuralEq for SampleFormat
impl StructuralPartialEq for SampleFormat
Auto Trait Implementations§
impl RefUnwindSafe for SampleFormat
impl Send for SampleFormat
impl Sync for SampleFormat
impl Unpin for SampleFormat
impl UnwindSafe for SampleFormat
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