Enum ndk::audio::AudioFormat
source · [−]#[repr(i32)]
pub enum AudioFormat {
PCM_Float,
PCM_I16,
Invalid,
Unspecified,
}
Available on crate feature
audio
only.Variants
PCM_Float
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)
.
PCM_I16
This format uses the i16 data type. The maximum range of the data is -32768 to 32767.
Invalid
Unspecified
Trait Implementations
sourceimpl Clone for AudioFormat
impl Clone for AudioFormat
sourcefn clone(&self) -> AudioFormat
fn clone(&self) -> AudioFormat
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for AudioFormat
impl Debug for AudioFormat
sourceimpl From<AudioFormat> for i32
impl From<AudioFormat> for i32
sourcefn from(enum_value: AudioFormat) -> Self
fn from(enum_value: AudioFormat) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<AudioFormat> for AudioFormat
impl PartialEq<AudioFormat> for AudioFormat
sourceimpl TryFrom<i32> for AudioFormat
impl TryFrom<i32> for AudioFormat
type Error = TryFromPrimitiveError<AudioFormat>
type Error = TryFromPrimitiveError<AudioFormat>
The type returned in the event of a conversion error.
sourcefn try_from(number: i32) -> Result<Self, TryFromPrimitiveError<Self>>
fn try_from(number: i32) -> Result<Self, TryFromPrimitiveError<Self>>
Performs the conversion.
sourceimpl TryFromPrimitive for AudioFormat
impl TryFromPrimitive for AudioFormat
type Primitive = i32
const NAME: &'static str = _
fn try_from_primitive(
number: Self::Primitive
) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for AudioFormat
impl Eq for AudioFormat
impl StructuralEq for AudioFormat
impl StructuralPartialEq for AudioFormat
Auto Trait Implementations
impl RefUnwindSafe for AudioFormat
impl Send for AudioFormat
impl Sync for AudioFormat
impl Unpin for AudioFormat
impl UnwindSafe for AudioFormat
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more