mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-25 05:07:12 +01:00
Fix Editor hanging if audiostream's pitch_scale is NaN
This commit is contained in:
parent
75ed28f2b3
commit
9b65e9df6a
@ -324,7 +324,7 @@ float AudioStreamPlayer2D::get_volume_db() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AudioStreamPlayer2D::set_pitch_scale(float p_pitch_scale) {
|
void AudioStreamPlayer2D::set_pitch_scale(float p_pitch_scale) {
|
||||||
ERR_FAIL_COND(p_pitch_scale <= 0.0);
|
ERR_FAIL_COND(!(p_pitch_scale > 0.0));
|
||||||
pitch_scale = p_pitch_scale;
|
pitch_scale = p_pitch_scale;
|
||||||
}
|
}
|
||||||
float AudioStreamPlayer2D::get_pitch_scale() const {
|
float AudioStreamPlayer2D::get_pitch_scale() const {
|
||||||
|
@ -684,7 +684,7 @@ float AudioStreamPlayer3D::get_max_db() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AudioStreamPlayer3D::set_pitch_scale(float p_pitch_scale) {
|
void AudioStreamPlayer3D::set_pitch_scale(float p_pitch_scale) {
|
||||||
ERR_FAIL_COND(p_pitch_scale <= 0.0);
|
ERR_FAIL_COND(!(p_pitch_scale > 0.0));
|
||||||
pitch_scale = p_pitch_scale;
|
pitch_scale = p_pitch_scale;
|
||||||
}
|
}
|
||||||
float AudioStreamPlayer3D::get_pitch_scale() const {
|
float AudioStreamPlayer3D::get_pitch_scale() const {
|
||||||
|
@ -231,7 +231,7 @@ float AudioStreamPlayer::get_volume_db() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AudioStreamPlayer::set_pitch_scale(float p_pitch_scale) {
|
void AudioStreamPlayer::set_pitch_scale(float p_pitch_scale) {
|
||||||
ERR_FAIL_COND(p_pitch_scale <= 0.0);
|
ERR_FAIL_COND(!(p_pitch_scale > 0.0));
|
||||||
pitch_scale = p_pitch_scale;
|
pitch_scale = p_pitch_scale;
|
||||||
}
|
}
|
||||||
float AudioStreamPlayer::get_pitch_scale() const {
|
float AudioStreamPlayer::get_pitch_scale() const {
|
||||||
|
@ -310,7 +310,7 @@ Ref<AudioEffectInstance> AudioEffectPitchShift::instance() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AudioEffectPitchShift::set_pitch_scale(float p_pitch_scale) {
|
void AudioEffectPitchShift::set_pitch_scale(float p_pitch_scale) {
|
||||||
ERR_FAIL_COND(p_pitch_scale <= 0.0);
|
ERR_FAIL_COND(!(p_pitch_scale > 0.0));
|
||||||
pitch_scale = p_pitch_scale;
|
pitch_scale = p_pitch_scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user