Class reference
AudioStreamOggVorbis
Inherits AudioStream
A class representing an Ogg Vorbis audio stream.
Description
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.
Properties
int bar_beats = 4
int bar_beats = 4int beat_count = 0
int beat_count = 0float bpm = 0.0
float bpm = 0.0bool loop = false
bool loop = falseIf true, the audio will play again from the specified loop_offset once it is done playing. Useful for ambient sounds and background music.
float loop_offset = 0.0
float loop_offset = 0.0Time in seconds at which the stream starts after being looped.
OggPacketSequence packet_sequence
OggPacketSequence packet_sequenceContains the raw Ogg data for this stream.
Dictionary tags = {}
Dictionary tags = {}Contains user-defined tags if found in the Ogg Vorbis data. Commonly used tags include title, artist, album, tracknumber, and date (date does not have a standard date format). Note: No tag is guaranteed to be present in every file, so make sure to account for the keys not always existing.
Methods
AudioStreamOggVorbis load_from_buffer(PackedByteArray stream_data) static
AudioStreamOggVorbis load_from_buffer(PackedByteArray stream_data) staticCreates a new AudioStreamOggVorbis instance from the given buffer. The buffer must contain Ogg Vorbis data.
AudioStreamOggVorbis load_from_file(String path) static
AudioStreamOggVorbis load_from_file(String path) staticCreates a new AudioStreamOggVorbis instance from the given file path. The file must be in Ogg Vorbis format.