ResourceImporterOggVorbis
Imports an Ogg Vorbis audio file for playback.
Imports an Ogg Vorbis audio file for playback.
Ogg Vorbis is a lossy audio format, with better audio quality compared to ResourceImporterMP3 at a given bitrate.
In most cases, it's recommended to use Ogg Vorbis over MP3. However, if you're using an MP3 sound source with no higher quality source available, then it's recommended to use the MP3 file directly to avoid double lossy compression.
Ogg Vorbis requires more CPU to decode than ResourceImporterWav. If you need to play a lot of simultaneous sounds, it's recommended to use WAV for those sounds instead, especially if targeting low-end devices.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
ResourceImporterOggVorbisConstructor
public ResourceImporterOggVorbis();Methods3
LoadFromBuffer2 overloads · Includes deprecated
public static AudioStreamOggVorbis LoadFromBuffer(byte[] streamData);Creates a new AudioStreamOggVorbis instance from the given buffer. The buffer must contain Ogg Vorbis data.
| Name | Type | Default |
|---|---|---|
streamData | byte[] | — |
AudioStreamOggVorbispublic static AudioStreamOggVorbis LoadFromBuffer(ReadOnlySpan<byte> streamData);Creates a new AudioStreamOggVorbis instance from the given buffer. The buffer must contain Ogg Vorbis data.
| Name | Type | Default |
|---|---|---|
streamData | ReadOnlySpan<byte> | — |
AudioStreamOggVorbisLoadFromFileAudioStreamOggVorbis · Deprecated
public static AudioStreamOggVorbis LoadFromFile(string path);Creates a new AudioStreamOggVorbis instance from the given file path. The file must be in Ogg Vorbis format.
| Name | Type | Default |
|---|---|---|
path | string | — |
AudioStreamOggVorbis