diff options
| author | Rémi Verschelde <remi@verschelde.fr> | 2021-02-01 20:55:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-01 20:55:25 +0100 |
| commit | d2e121650476af0a91bc24ea38253428e97f9695 (patch) | |
| tree | 22b120a76f0430faa9e4a9383f7c0c83557616b6 /servers/audio/effects/audio_effect_distortion.cpp | |
| parent | 264504d76d2c1ea374d5508e6a2634e2b5002d84 (diff) | |
| parent | 1d5042c9e265219dec8da7311879f12ef3ef698b (diff) | |
| download | redot-engine-d2e121650476af0a91bc24ea38253428e97f9695.tar.gz | |
Merge pull request #37547 from aaronfranke/tau
Use Math_TAU and deg2rad/etc in more places and optimize code
Diffstat (limited to 'servers/audio/effects/audio_effect_distortion.cpp')
| -rw-r--r-- | servers/audio/effects/audio_effect_distortion.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/audio/effects/audio_effect_distortion.cpp b/servers/audio/effects/audio_effect_distortion.cpp index 8f713ace22..b79434e7c2 100644 --- a/servers/audio/effects/audio_effect_distortion.cpp +++ b/servers/audio/effects/audio_effect_distortion.cpp @@ -36,8 +36,8 @@ void AudioEffectDistortionInstance::process(const AudioFrame *p_src_frames, Audi const float *src = (const float *)p_src_frames; float *dst = (float *)p_dst_frames; - //float lpf_c=expf(-2.0*Math_PI*keep_hf_hz.get()/(mix_rate*(float)OVERSAMPLE)); - float lpf_c = expf(-2.0 * Math_PI * base->keep_hf_hz / (AudioServer::get_singleton()->get_mix_rate())); + //float lpf_c=expf(-Math_TAU*keep_hf_hz.get()/(mix_rate*(float)OVERSAMPLE)); + float lpf_c = expf(-Math_TAU * base->keep_hf_hz / (AudioServer::get_singleton()->get_mix_rate())); float lpf_ic = 1.0 - lpf_c; float drive_f = base->drive; |
