class-description NEWS COMMUNITY STORE TUTORIALS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE TUTORIALS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectRefCounted AudioStreamPlayback
Meta class for playing back audio.

Can play, loop, pause a scroll through audio. See AudioStream and AudioStreamOggVorbis for usage.

int _get_loop_count<>():int

Overridable method. Should return how many times this audio stream has looped. Most built-in playbacks always return 0.

Variant _get_parameter<>( StringName name=, name:StringName=, ):Variant

Return the current value of a playback parameter by name (see AudioStream._get_parameter_list()).

float _get_playback_position<>():float

Overridable method. Should return the current progress along the audio stream, in seconds.

bool _is_playing<>():bool

Overridable method. Should return true if this playback is active and playing its audio stream.

int _mix<>( =, :=, float rate_scale=, rate_scale:float=, int frames=, frames:int=, ):int

Override this method to customize how the audio stream is mixed. This method is called even if the playback is not active.

Note: It is not useful to override this method in GDScript or C#. Only GDExtension can take advantage of it.

void _seek<>( float position=, position:float=, ):void

Override this method to customize what happens when seeking this audio stream at the given position, such as by calling AudioStreamPlayer.seek().

void _set_parameter<>( StringName name=, name:StringName=, Variant value=, value:Variant=, ):void

Set the current value of a playback parameter by name (see AudioStream._get_parameter_list()).

void _start<>( float from_pos=, from_pos:float=, ):void

Override this method to customize what happens when the playback starts at the given position, such as by calling AudioStreamPlayer.play().

void _stop<>():void

Override this method to customize what happens when the playback is stopped, such as by calling AudioStreamPlayer.stop().

void _tag_used_streams<>():void

Overridable method. Called whenever the audio stream is mixed if the playback is active and AudioServer.set_enable_tagging_used_audio_streams() has been set to true. Editor plugins may use this method to "tag" the current position along the audio stream and display it in a preview.

int get_loop_count<>():int

Returns the number of times the stream has looped.

float get_playback_position<>():float

Returns the current position in the stream, in seconds.

AudioSamplePlayback get_sample_playback<>():AudioSamplePlayback

Experimental: This method may be changed or removed in future versions.

Returns the AudioSamplePlayback associated with this AudioStreamPlayback for playing back the audio sample of this stream.

bool is_playing<>():bool

Returns true if the stream is playing.

PackedVector2Array mix_audio<>( float rate_scale=, rate_scale:float=, int frames=, frames:int=, ):PackedVector2Array

Mixes up to frames of audio from the stream from the current position, at a rate of rate_scale, advancing the stream.

Returns a PackedVector2Array where each element holds the left and right channel volume levels of each frame.

Note: Can return fewer frames than requested, make sure to use the size of the return value.

void seek<>( float time=0.0, time:float=0.0, ):void

Seeks the stream at the given time, in seconds.

void set_sample_playback<>( AudioSamplePlayback playback_sample=, playback_sample:AudioSamplePlayback=, ):void

Experimental: This method may be changed or removed in future versions.

Associates AudioSamplePlayback to this AudioStreamPlayback for playing back the audio sample of this stream.

void start<>( float from_pos=0.0, from_pos:float=0.0, ):void

Starts the stream from the given from_pos, in seconds.

void stop<>():void

Stops the stream.




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...