summaryrefslogtreecommitdiff
path: root/servers/audio
diff options
context:
space:
mode:
authorFerenc Arn <tagcup@yahoo.com>2017-01-14 14:35:39 -0600
committerFerenc Arn <tagcup@yahoo.com>2017-01-16 13:36:33 -0600
commit6f4f9aa6ded6da027c84cc466c767334dc3d3362 (patch)
tree4d45d7e600a069d7feb2a2dae3a70d6b9ddbf884 /servers/audio
parentd13f2f9e25e380496e706b59720cd85eed299ca2 (diff)
Overloaded basic math funcs (double and float variants). Use real_t rather than float or double in generic functions (core/math) whenever possible.
Also inlined some more math functions.
Diffstat (limited to 'servers/audio')
-rw-r--r--servers/audio/audio_filter_sw.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/audio/audio_filter_sw.cpp b/servers/audio/audio_filter_sw.cpp
index cdfe1a29f0..e97eb75d04 100644
--- a/servers/audio/audio_filter_sw.cpp
+++ b/servers/audio/audio_filter_sw.cpp
@@ -142,9 +142,9 @@ void AudioFilterSW::prepare_coefficients(Coeffs *p_coeffs) {
//this one is extra tricky
double hicutoff=resonance;
double centercutoff = (cutoff+resonance)/2.0;
- double bandwidth=(Math::log(centercutoff)-Math::log(hicutoff))/Math::log(2);
+ double bandwidth=(Math::log(centercutoff)-Math::log(hicutoff))/Math::log((double)2);
omega=2.0*Math_PI*centercutoff/sampling_rate;
- alpha = Math::sin(omega)*Math::sinh( Math::log(2)/2 * bandwidth * omega/Math::sin(omega) );
+ alpha = Math::sin(omega)*Math::sinh( Math::log((double)2)/2 * bandwidth * omega/Math::sin(omega) );
a0=1+alpha;
p_coeffs->b0 = alpha;