Up to date

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

AudioStreamRandomizer

Inherits: AudioStream < Resource < RefCounted < Object

Wraps a pool of audio streams with pitch and volume shifting.

Description

Picks a random AudioStream from the pool, depending on the playback mode, and applies random pitch shifting and volume shifting during playback.

Properties

PlaybackMode

playback_mode

0

float

random_pitch

1.0

float

random_volume_offset_db

0.0

int

streams_count

0

Methods

void

add_stream ( int index, AudioStream stream, float weight=1.0 )

AudioStream

get_stream ( int index ) const

float

get_stream_probability_weight ( int index ) const

void

move_stream ( int index_from, int index_to )

void

remove_stream ( int index )

void

set_stream ( int index, AudioStream stream )

void

set_stream_probability_weight ( int index, float weight )