#[repr(u32)]pub enum SoundFormat {
None = 0,
PCM8 = 1,
PCM16 = 2,
PCM24 = 3,
PCM32 = 4,
PCMFloat = 5,
BitStream = 6,
}
Expand description
These definitions describe the native format of the hardware or software buffer that will be used.
Variants§
None = 0
Uninitalized / unknown.
PCM8 = 1
8bit integer PCM data.
PCM16 = 2
16bit integer PCM data.
PCM24 = 3
24bit integer PCM data.
PCM32 = 4
32bit integer PCM data.
PCMFloat = 5
32bit floating point PCM data.
BitStream = 6
Sound data is in its native compressed format.
Trait Implementations§
Source§impl Clone for SoundFormat
impl Clone for SoundFormat
Source§fn clone(&self) -> SoundFormat
fn clone(&self) -> SoundFormat
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 SoundFormat
impl Debug for SoundFormat
Source§impl From<SoundFormat> for u32
impl From<SoundFormat> for u32
Source§fn from(enum_value: SoundFormat) -> Self
fn from(enum_value: SoundFormat) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SoundFormat
impl PartialEq for SoundFormat
Source§impl TryFrom<u32> for SoundFormat
impl TryFrom<u32> for SoundFormat
Source§type Error = TryFromPrimitiveError<SoundFormat>
type Error = TryFromPrimitiveError<SoundFormat>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for SoundFormat
impl TryFromPrimitive for SoundFormat
const NAME: &'static str = "SoundFormat"
type Primitive = u32
type Error = TryFromPrimitiveError<SoundFormat>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
Source§impl UnsafeFromPrimitive for SoundFormat
impl UnsafeFromPrimitive for SoundFormat
type Primitive = u32
Source§unsafe fn unchecked_transmute_from(number: Self::Primitive) -> Self
unsafe fn unchecked_transmute_from(number: Self::Primitive) -> Self
Transmutes into an enum from its primitive. Read more
Source§unsafe fn from_unchecked(number: Self::Primitive) -> Self
unsafe fn from_unchecked(number: Self::Primitive) -> Self
👎Deprecated since 0.6.0: Prefer to use
unchecked_transmute_from
, from_unchecked
will be removed in a future release.Transmutes into an enum from its primitive. Read more
impl Copy for SoundFormat
impl Eq for SoundFormat
impl StructuralPartialEq for SoundFormat
Auto Trait Implementations§
impl Freeze for SoundFormat
impl RefUnwindSafe for SoundFormat
impl Send for SoundFormat
impl Sync for SoundFormat
impl Unpin for SoundFormat
impl UnwindSafe for SoundFormat
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