Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
AudioStream¶
Inherits: Resource < RefCounted < Object
Inherited By: AudioStreamGenerator, AudioStreamMicrophone, AudioStreamMP3, AudioStreamOggVorbis, AudioStreamPolyphonic, AudioStreamRandomizer, AudioStreamWAV
Base class for audio streams.
描述¶
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.
教程¶
Methods¶
_get_beat_count ( ) virtual const |
|
_get_bpm ( ) virtual const |
|
_get_length ( ) virtual const |
|
_get_stream_name ( ) virtual const |
|
_instantiate_playback ( ) virtual const |
|
_is_monophonic ( ) virtual const |
|
get_length ( ) const |
|
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.