summaryrefslogtreecommitdiffstats
path: root/servers/audio/effects/eq.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-02-01 20:55:25 +0100
committerGitHub <noreply@github.com>2021-02-01 20:55:25 +0100
commitd2e121650476af0a91bc24ea38253428e97f9695 (patch)
tree22b120a76f0430faa9e4a9383f7c0c83557616b6 /servers/audio/effects/eq.cpp
parent264504d76d2c1ea374d5508e6a2634e2b5002d84 (diff)
parent1d5042c9e265219dec8da7311879f12ef3ef698b (diff)
downloadredot-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/eq.cpp')
-rw-r--r--servers/audio/effects/eq.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/audio/effects/eq.cpp b/servers/audio/effects/eq.cpp
index 2181411b9e..e0c3eb6d3a 100644
--- a/servers/audio/effects/eq.cpp
+++ b/servers/audio/effects/eq.cpp
@@ -89,8 +89,8 @@ void EQ::recalculate_band_coefficients() {
double frq_l = round(frq / pow(2.0, octave_size / 2.0));
double side_gain2 = POW2(Math_SQRT12);
- double th = 2.0 * Math_PI * frq / mix_rate;
- double th_l = 2.0 * Math_PI * frq_l / mix_rate;
+ double th = Math_TAU * frq / mix_rate;
+ double th_l = Math_TAU * frq_l / mix_rate;
double c2a = side_gain2 * POW2(cos(th)) - 2.0 * side_gain2 * cos(th_l) * cos(th) + side_gain2 - POW2(sin(th_l));