Enum ndk::audio::AudioFormat
source · #[non_exhaustive]#[repr(i32)]pub enum AudioFormat {
Invalid = -1,
Unspecified = 0,
PCM_I16 = 1,
PCM_Float = 2,
}
Available on crate feature
audio
only.Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Invalid = -1
Unspecified = 0
PCM_I16 = 1
This format uses the i16 data type. The maximum range of the data is -32768 to 32767.
PCM_Float = 2
This format uses the float data type. The nominal range of the data is [-1.0f32, 1.0f32). Values outside that range may be clipped.
See also audioData
at
AudioTrack#write(float[], int, int, int)
.
Trait Implementations§
source§impl Clone for AudioFormat
impl Clone for AudioFormat
source§fn clone(&self) -> AudioFormat
fn clone(&self) -> AudioFormat
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 AudioFormat
impl Debug for AudioFormat
source§impl From<AudioFormat> for i32
impl From<AudioFormat> for i32
source§fn from(enum_value: AudioFormat) -> Self
fn from(enum_value: AudioFormat) -> Self
Converts to this type from the input type.
source§impl From<i32> for AudioFormat
impl From<i32> for AudioFormat
source§impl FromPrimitive for AudioFormat
impl FromPrimitive for AudioFormat
source§impl PartialEq for AudioFormat
impl PartialEq for AudioFormat
source§fn eq(&self, other: &AudioFormat) -> bool
fn eq(&self, other: &AudioFormat) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for AudioFormat
impl Eq for AudioFormat
impl StructuralPartialEq for AudioFormat
Auto Trait Implementations§
impl Freeze for AudioFormat
impl RefUnwindSafe for AudioFormat
impl Send for AudioFormat
impl Sync for AudioFormat
impl Unpin for AudioFormat
impl UnwindSafe for AudioFormat
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