Restrict set_pitch_scale to positive scales for AudioStreamPlayer*
Fixes #20459. Co-authored-by: Tiago José Sousa Magalhães <crakylps@gmail.com>
This commit is contained in:
@ -296,6 +296,7 @@ float AudioStreamPlayer2D::get_volume_db() const {
|
||||
}
|
||||
|
||||
void AudioStreamPlayer2D::set_pitch_scale(float p_pitch_scale) {
|
||||
ERR_FAIL_COND(p_pitch_scale <= 0.0);
|
||||
pitch_scale = p_pitch_scale;
|
||||
}
|
||||
float AudioStreamPlayer2D::get_pitch_scale() const {
|
||||
|
||||
Reference in New Issue
Block a user