aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/distortion.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-01-06 04:16:51 -0800
committerChris Robinson <[email protected]>2019-01-06 04:16:51 -0800
commitda3a916042a7ba9426af1d6f03e689dbd7760191 (patch)
treeab6cfc0d2fd26504a013989af7ecd399a4034914 /Alc/effects/distortion.cpp
parent98f3e6a16295029129193a073680a70c034703dd (diff)
Replace macros with constexpr inline functions
Diffstat (limited to 'Alc/effects/distortion.cpp')
-rw-r--r--Alc/effects/distortion.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Alc/effects/distortion.cpp b/Alc/effects/distortion.cpp
index e54ae455..1b9c66fa 100644
--- a/Alc/effects/distortion.cpp
+++ b/Alc/effects/distortion.cpp
@@ -65,7 +65,8 @@ void ALdistortionState::update(const ALCcontext *context, const ALeffectslot *sl
const ALCdevice *device{context->Device};
/* Store waveshaper edge settings. */
- const ALfloat edge{minf(std::sin(props->Distortion.Edge * F_PI_2), 0.99f)};
+ const ALfloat edge{
+ minf(std::sin(al::MathDefs<float>::Pi()*0.5f * props->Distortion.Edge), 0.99f)};
mEdgeCoeff = 2.0f * edge / (1.0f-edge);
ALfloat cutoff{props->Distortion.LowpassCutoff};