Browse Source

Allow Param limits with min > max

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
445686b89d
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      include/engine/Param.hpp
  2. +1
    -1
      src/app/ParamQuantity.cpp
  3. +1
    -1
      src/engine/Engine.cpp

+ 1
- 1
include/engine/Param.hpp View File

@@ -81,7 +81,7 @@ struct Param {

/* Clamps and sets the value. */
void setValue(float value) {
this->value = math::clamp(value, minValue, maxValue);
this->value = math::clampSafe(value, minValue, maxValue);
}

/** Returns whether the Param has finite range between minValue and maxValue. */


+ 1
- 1
src/app/ParamQuantity.cpp View File

@@ -15,7 +15,7 @@ engine::Param *ParamQuantity::getParam() {
void ParamQuantity::setSmoothValue(float smoothValue) {
if (!module)
return;
smoothValue = math::clamp(smoothValue, getMinValue(), getMaxValue());
smoothValue = math::clampSafe(smoothValue, getMinValue(), getMaxValue());
APP->engine->setSmoothParam(module, paramId, smoothValue);
}



+ 1
- 1
src/engine/Engine.cpp View File

@@ -17,7 +17,7 @@ namespace rack {
namespace engine {


void disableDenormals() {
static void disableDenormals() {
// Set CPU to flush-to-zero (FTZ) and denormals-are-zero (DAZ) mode
// https://software.intel.com/en-us/node/682949
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);


Loading…
Cancel
Save