diff options
Diffstat (limited to 'servers/audio/effects/audio_effect_chorus.cpp')
-rw-r--r-- | servers/audio/effects/audio_effect_chorus.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/servers/audio/effects/audio_effect_chorus.cpp b/servers/audio/effects/audio_effect_chorus.cpp index 0b7c909071..d3105343ae 100644 --- a/servers/audio/effects/audio_effect_chorus.cpp +++ b/servers/audio/effects/audio_effect_chorus.cpp @@ -1,5 +1,6 @@ #include "audio_effect_chorus.h" #include "servers/audio_server.h" +#include "math_funcs.h" void AudioEffectChorusInstance::process(const AudioFrame *p_src_frames,AudioFrame *p_dst_frames,int p_frame_count) { @@ -61,7 +62,7 @@ void AudioEffectChorusInstance::_process_chunk(const AudioFrame *p_src_frames,Au //low pass filter if (v.cutoff==0) continue; - float auxlp=expf(-2.0*M_PI*v.cutoff/mix_rate); + float auxlp=expf(-2.0*Math_PI*v.cutoff/mix_rate); float c1=1.0-auxlp; float c2=auxlp; AudioFrame h=filter_h[vc]; @@ -83,7 +84,7 @@ void AudioEffectChorusInstance::_process_chunk(const AudioFrame *p_src_frames,Au float phase=(float)(local_cycles&AudioEffectChorus::CYCLES_MASK)/(float)(1<<AudioEffectChorus::CYCLES_FRAC); - float wave_delay=sinf(phase*2.0*M_PI)*max_depth_frames; + float wave_delay=sinf(phase*2.0*Math_PI)*max_depth_frames; int wave_delay_frames=lrint(floor(wave_delay)); float wave_delay_frac=wave_delay-(float)wave_delay_frames; |