Up to date

This page is up to date for Godot 4.1. If you still find outdated information, please open an issue.

AudioStream

Inherits: Resource < RefCounted < Object

Inherited By: AudioStreamGenerator, AudioStreamMicrophone, AudioStreamMP3, AudioStreamOggVorbis, AudioStreamPolyphonic, AudioStreamRandomizer, AudioStreamWAV

Base class for audio streams.

Description

Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via AudioStreamWAV) and Ogg (via AudioStreamOggVorbis) file formats.

Tutorials

Methods

int

_get_beat_count ( ) virtual const

float

_get_bpm ( ) virtual const

float

_get_length ( ) virtual const

String

_get_stream_name ( ) virtual const

AudioStreamPlayback

_instantiate_playback ( ) virtual const

bool

_is_monophonic ( ) virtual const

float

get_length ( ) const

AudioStreamPlayback

instantiate_playback ( )

bool

is_monophonic ( ) const


Method Descriptions

int _get_beat_count ( ) virtual const

There is currently no description for this method. Please help us by contributing one!


float _get_bpm ( ) virtual const

There is currently no description for this method. Please help us by contributing one!


float _get_length ( ) virtual const

There is currently no description for this method. Please help us by contributing one!


String _get_stream_name ( ) virtual const

There is currently no description for this method. Please help us by contributing one!


AudioStreamPlayback _instantiate_playback ( ) virtual const

There is currently no description for this method. Please help us by contributing one!


bool _is_monophonic ( ) virtual const

There is currently no description for this method. Please help us by contributing one!


float get_length ( ) const

Returns the length of the audio stream in seconds.


AudioStreamPlayback instantiate_playback ( )

Returns an AudioStreamPlayback. Useful for when you want to extend _instantiate_playback but call instantiate_playback from an internally held AudioStream subresource. An example of this can be found in the source files for AudioStreamRandomPitch::instantiate_playback.


bool is_monophonic ( ) const

Returns true if this audio stream only supports monophonic playback, or false if the audio stream supports polyphony.