Class ResourceImporterOggVorbis
- Namespace
- Godot
- Assembly
- GodotSharpEditor.dll
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.
public class ResourceImporterOggVorbis : ResourceImporter, IDisposable
- Inheritance
-
ResourceImporterOggVorbis
- Implements
- Inherited Members
Constructors
ResourceImporterOggVorbis()
public ResourceImporterOggVorbis()
Methods
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.
Returns
LoadFromBuffer(byte[])
This method loads audio data from a PackedByteArray buffer into an AudioStreamOggVorbis object.
public static AudioStreamOggVorbis LoadFromBuffer(byte[] buffer)
Parameters
buffer
byte[]
Returns
LoadFromFile(string)
This method loads audio data from a file into an AudioStreamOggVorbis object. The file path is provided as a string.
public static AudioStreamOggVorbis LoadFromFile(string path)
Parameters
path
string