diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2021-05-24 22:29:58 +0200 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2021-05-24 22:29:58 +0200 |
commit | 9b9fbaafc404f8cfc822f64d356ed3c37e8778c1 (patch) | |
tree | 8e9b842a2321f506265b3854249155ed2a818008 /src/effects | |
parent | 1659294fa52d93a1f8f6d74d51498c88d595363e (diff) | |
parent | 6ea8777e3358baabc06f89349ce66acc6347b943 (diff) |
Merge branch '2.3' of git@github.com:mixxxdj/mixxx.git
# Conflicts:
# src/controllers/controllerengine.cpp
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/builtin/autopaneffect.cpp | 4 | ||||
-rw-r--r-- | src/effects/builtin/bitcrushereffect.cpp | 2 | ||||
-rw-r--r-- | src/effects/builtin/phasereffect.cpp | 10 | ||||
-rw-r--r-- | src/effects/lv2/lv2manifest.cpp | 9 |
4 files changed, 12 insertions, 13 deletions
diff --git a/src/effects/builtin/autopaneffect.cpp b/src/effects/builtin/autopaneffect.cpp index 62828f30dc..d425e5ca6e 100644 --- a/src/effects/builtin/autopaneffect.cpp +++ b/src/effects/builtin/autopaneffect.cpp @@ -156,8 +156,8 @@ void AutoPanEffect::processChannel( // part of the period fraction being a step (not in the slope) CSAMPLE stepsFractionPart = floorf((quarter + 1.0f) / 2.0f) * smoothing; - // float inInterval = fmod( periodFraction, (period / 2.0) ); - float inStepInterval = fmod(periodFraction, 0.5f); + // float inInterval = std::fmod( periodFraction, (period / 2.0) ); + float inStepInterval = std::fmod(periodFraction, 0.5f); CSAMPLE angleFraction; if (inStepInterval > u && inStepInterval < (u + smoothing)) { diff --git a/src/effects/builtin/bitcrushereffect.cpp b/src/effects/builtin/bitcrushereffect.cpp index ddb8eb8313..0f41fd054f 100644 --- a/src/effects/builtin/bitcrushereffect.cpp +++ b/src/effects/builtin/bitcrushereffect.cpp @@ -83,7 +83,7 @@ void BitCrusherEffect::processChannel(const ChannelHandle& handle, m_pBitDepthParameter ? m_pBitDepthParameter->value() : 16); // divided by two because we use float math which includes the sing bit anyway - const CSAMPLE scale = pow(2.0f, bit_depth) / 2; + const CSAMPLE scale = std::pow(2.0f, bit_depth) / 2; // Gain correction is required, because MSB (values above 0.5) is usually // rarely used, to achieve equal loudness and maximum dynamic const CSAMPLE gainCorrection = (17 - bit_depth) / 8; diff --git a/src/effects/builtin/phasereffect.cpp b/src/effects/builtin/phasereffect.cpp index 229ea833de..defd40a6a2 100644 --- a/src/effects/builtin/phasereffect.cpp +++ b/src/effects/builtin/phasereffect.cpp @@ -2,8 +2,6 @@ #include <QDebug> -#include "util/math.h" - namespace { constexpr unsigned int updateCoef = 32; constexpr auto kDoublePi = static_cast<CSAMPLE>(2.0 * M_PI); @@ -198,8 +196,8 @@ void PhaserEffect::processChannel(const ChannelHandle& handle, for (SINT i = 0; i < bufferParameters.samplesPerBuffer(); i += bufferParameters.channelCount()) { - left = pInput[i] + tanh(left * feedback); - right = pInput[i + 1] + tanh(right * feedback); + left = pInput[i] + std::tanh(left * feedback); + right = pInput[i + 1] + std::tanh(right * feedback); // For stereo enabled, the channels are out of phase pState->leftPhase = fmodf(pState->leftPhase + freqSkip, kDoublePi); @@ -218,8 +216,8 @@ void PhaserEffect::processChannel(const ChannelHandle& handle, CSAMPLE wLeft = range * delayLeft; CSAMPLE wRight = range * delayRight; - CSAMPLE tanwLeft = tanh(wLeft / 2); - CSAMPLE tanwRight = tanh(wRight / 2); + CSAMPLE tanwLeft = std::tanh(wLeft / 2); + CSAMPLE tanwRight = std::tanh(wRight / 2); filterCoefLeft = (1.0f - tanwLeft) / (1.0f + tanwLeft); filterCoefRight = (1.0f - tanwRight) / (1.0f + tanwRight); diff --git a/src/effects/lv2/lv2manifest.cpp b/src/effects/lv2/lv2manifest.cpp index 7c601f598b..31c854eca6 100644 --- a/src/effects/lv2/lv2manifest.cpp +++ b/src/effects/lv2/lv2manifest.cpp @@ -1,6 +1,7 @@ #include "effects/lv2/lv2manifest.h" + #include "effects/effectmanifestparameter.h" -#include "util/math.h" +#include "util/fpclassify.h" LV2Manifest::LV2Manifest(const LilvPlugin* plug, QHash<QString, LilvNode*>& properties) @@ -118,19 +119,19 @@ LV2Manifest::LV2Manifest(const LilvPlugin* plug, // Some plugins don't specify minimum, maximum and default values // In this case set the minimum and default values to 0 and // the maximum to the number of scale points - if (isnan(m_default[i])) { + if (util_isnan(m_default[i])) { param->setDefault(0); } else { param->setDefault(m_default[i]); } - if (isnan(m_minimum[i])) { + if (util_isnan(m_minimum[i])) { param->setMinimum(0); } else { param->setMinimum(m_minimum[i]); } - if (isnan(m_maximum[i])) { + if (util_isnan(m_maximum[i])) { param->setMaximum(param->getSteps().size() - 1); } else { param->setMaximum(m_maximum[i]); |