Enum SoundType

Source
#[repr(u32)]
pub enum SoundType {
Show 25 variants Unknown = 0, AIFF = 1, ASF = 2, DLS = 3, FLAC = 4, FSB = 5, IT = 6, MIDI = 7, MOD = 8, MPEG = 9, OGGVORBIS = 10, Playlist = 11, RAW = 12, S3M = 13, User = 14, WAV = 15, XM = 16, XMA = 17, AudioQueue = 18, AT9 = 19, Vorbis = 20, MediaFoundation = 21, MediaCodec = 22, FADPCM = 23, OPUS = 24,
}
Expand description

Recognized audio formats that can be loaded into a Sound.

Variants§

§

Unknown = 0

Unknown or custom codec plug-in.

§

AIFF = 1

Audio Interchange File Format (.aif, .aiff). Uncompressed integer formats only.

§

ASF = 2

Microsoft Advanced Systems Format (.asf, .wma, .wmv). Platform provided decoder, available only on Windows.

§

DLS = 3

Downloadable Sound (.dls). Multi-sound bank format used by MIDI (.mid).

§

FLAC = 4

Free Lossless Audio Codec (.flac).

§

FSB = 5

FMOD Sample Bank (.fsb). Proprietary multi-sound bank format. Supported encodings: PCM16, FADPCM, Vorbis, AT9, XMA, Opus.

§

IT = 6

Impulse Tracker (.it).

§

MIDI = 7

Musical Instrument Digital Interface (.mid).

§

MOD = 8

Protracker / Fasttracker Module File (.mod).

§

MPEG = 9

Moving Picture Experts Group (.mp2, .mp3). Also supports .wav (RIFF) container format.

§

OGGVORBIS = 10

Ogg Vorbis (.ogg).

§

Playlist = 11

Play list information container (.asx, .pls, .m3u, .wax). No audio, tags only.

§

RAW = 12

Raw uncompressed PCM data (.raw).

§

S3M = 13

ScreamTracker 3 Module (.s3m).

§

User = 14

User created sound.

§

WAV = 15

Microsoft Waveform Audio File Format (.wav). Supported encodings: Uncompressed PCM, IMA ADPCM. Platform provided ACM decoder extensions, available only on Windows.

§

XM = 16

FastTracker 2 Extended Module (.xm).

§

XMA = 17

Microsoft XMA bit-stream supported by FSB (.fsb) container format.

Platform provided decoder, available only on Xbox.

§

AudioQueue = 18

Apple Audio Queue decoder (.mp4, .m4a, .mp3). Supported encodings: AAC, ALAC, MP3. Platform provided decoder, available only on iOS / tvOS devices.

§

AT9 = 19

Sony ATRAC9 bit-stream supported by FSB (.fsb) container format. Platform provided decoder, available only on PlayStation.

§

Vorbis = 20

Vorbis bit-stream supported by FSB (.fsb) container format.

§

MediaFoundation = 21

Microsoft Media Foundation decoder (.asf, .wma, .wmv, .mp4, .m4a). Platform provided decoder, available only on UWP.

§

MediaCodec = 22

Google Media Codec decoder (.m4a, .mp4). Platform provided decoder, available only on Android.

§

FADPCM = 23

FMOD Adaptive Differential Pulse Code Modulation bit-stream supported by FSB (.fsb) container format.

§

OPUS = 24

Opus bit-stream supported by FSB (.fsb) container format. Platform provided decoder, available only on Xbox Series X|S, PS5, and Switch.

Trait Implementations§

Source§

impl Clone for SoundType

Source§

fn clone(&self) -> SoundType

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 SoundType

Source§

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

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

impl From<SoundType> for u32

Source§

fn from(enum_value: SoundType) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for SoundType

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<u32> for SoundType

Source§

type Error = TryFromPrimitiveError<SoundType>

The type returned in the event of a conversion error.
Source§

fn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for SoundType

Source§

impl UnsafeFromPrimitive for SoundType

Source§

type Primitive = u32

Source§

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

👎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
Source§

impl Copy for SoundType

Source§

impl Eq for SoundType

Source§

impl StructuralPartialEq for SoundType

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<T> ToOwned for T
where T: Clone,

Source§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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

Source§

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.