#[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 TryFromPrimitive for SoundType
impl TryFromPrimitive for SoundType
Source§impl UnsafeFromPrimitive for SoundType
impl UnsafeFromPrimitive for SoundType
type Primitive = u32
Source§unsafe fn unchecked_transmute_from(number: Self::Primitive) -> Self
unsafe fn unchecked_transmute_from(number: Self::Primitive) -> Self
Source§unsafe fn from_unchecked(number: Self::Primitive) -> Self
unsafe fn from_unchecked(number: Self::Primitive) -> Self
unchecked_transmute_from
, from_unchecked
will be removed in a future release.