Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
vst2: fix plugin->host param changes, cleanup whitespace
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Aug 27, 2023
1 parent cb630fa commit 61d38eb
Show file tree
Hide file tree
Showing 3 changed files with 195 additions and 201 deletions.
14 changes: 7 additions & 7 deletions distrho/DistrhoDetails.hpp
Expand Up @@ -332,7 +332,7 @@ struct ParameterRanges {
/**
Constructor using custom values.
*/
constexpr ParameterRanges(float df, float mn, float mx) noexcept
constexpr ParameterRanges(const float df, const float mn, const float mx) noexcept
: def(df),
min(mn),
max(mx) {}
Expand All @@ -359,7 +359,7 @@ struct ParameterRanges {
/**
Get a fixed value within range.
*/
float getFixedValue(const float& value) const noexcept
float getFixedValue(const float value) const noexcept
{
if (value <= min)
return min;
Expand All @@ -371,7 +371,7 @@ struct ParameterRanges {
/**
Get a value normalized to 0.0<->1.0.
*/
float getNormalizedValue(const float& value) const noexcept
float getNormalizedValue(const float value) const noexcept
{
const float normValue = (value - min) / (max - min);

Expand Down Expand Up @@ -400,7 +400,7 @@ struct ParameterRanges {
/**
Get a value normalized to 0.0<->1.0, fixed within range.
*/
float getFixedAndNormalizedValue(const float& value) const noexcept
float getFixedAndNormalizedValue(const float value) const noexcept
{
if (value <= min)
return 0.0f;
Expand All @@ -421,7 +421,7 @@ struct ParameterRanges {
Get a value normalized to 0.0<->1.0, fixed within range.
Overloaded function using double precision values.
*/
double getFixedAndNormalizedValue(const double& value) const noexcept
double getFixedAndNormalizedValue(const double value) const noexcept
{
if (value <= min)
return 0.0;
Expand All @@ -441,7 +441,7 @@ struct ParameterRanges {
/**
Get a proper value previously normalized to 0.0<->1.0.
*/
float getUnnormalizedValue(const float& value) const noexcept
float getUnnormalizedValue(const float value) const noexcept
{
if (value <= 0.0f)
return min;
Expand All @@ -455,7 +455,7 @@ struct ParameterRanges {
Get a proper value previously normalized to 0.0<->1.0.
Overloaded function using double precision values.
*/
double getUnnormalizedValue(const double& value) const noexcept
double getUnnormalizedValue(const double value) const noexcept
{
if (value <= 0.0)
return min;
Expand Down

0 comments on commit 61d38eb

Please sign in to comment.