AudioStreamGeneratorPlayback

    Plays back audio generated using AudioStreamGenerator.

    This class is meant to be used with AudioStreamGenerator to play back the generated audio in real-time.

    • bool can_push_buffer ( amount ) const

    Returns if a buffer of the size can be pushed to the audio sample data buffer without overflowing it, otherwise.


    Clears the audio sample data buffer.


    • int get_frames_available ( ) const

    Returns the number of audio data frames left to play. If this returned number reaches , the audio will stop playing until frames are added again. Therefore, make sure your script can always generate and push new audio frames fast enough to avoid audio cracking.


    • get_skips ( ) const

    • bool push_buffer ( frames )

    Pushes several audio data frames to the buffer. This is usually more efficient than push_frame in C# and compiled languages via GDNative, but may be less efficient in GDScript.