Class AudioStreamOggVorbis
- Namespace
- Godot
- Assembly
- GodotSharp.dll
The AudioStreamOggVorbis class is a specialized AudioStream for handling Ogg Vorbis file formats. It offers functionality for loading and playing back Ogg Vorbis files, as well as managing looping and other playback properties. This class is part of the audio stream system, which also supports WAV files through the AudioStreamWav class.
public class AudioStreamOggVorbis : AudioStream, IDisposable
- Inheritance
-
AudioStreamOggVorbis
- Implements
- Inherited Members
Constructors
AudioStreamOggVorbis()
public AudioStreamOggVorbis()
Properties
BarBeats
public int BarBeats { get; set; }
Property Value
BeatCount
public int BeatCount { get; set; }
Property Value
Bpm
public double Bpm { get; set; }
Property Value
Loop
If true, the audio will play again from the specified LoopOffset once it is done playing. Useful for ambient sounds and background music.
public bool Loop { get; set; }
Property Value
LoopOffset
Time in seconds at which the stream starts after being looped.
public double LoopOffset { get; set; }
Property Value
PacketSequence
Contains the raw Ogg data for this stream.
public OggPacketSequence PacketSequence { get; set; }
Property Value
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[])
Creates a new AudioStreamOggVorbis instance from the given buffer. The buffer must contain Ogg Vorbis data.
public static AudioStreamOggVorbis LoadFromBuffer(byte[] buffer)
Parameters
buffer
byte[]
Returns
LoadFromFile(string)
Creates a new AudioStreamOggVorbis instance from the given file path. The file must be in Ogg Vorbis format.
public static AudioStreamOggVorbis LoadFromFile(string path)
Parameters
path
string