|
|
@@ -32,6 +32,7 @@ |
|
|
# define CARLA_BACKEND_START_NAMESPACE namespace CarlaBackend { |
|
|
# define CARLA_BACKEND_START_NAMESPACE namespace CarlaBackend { |
|
|
# define CARLA_BACKEND_END_NAMESPACE } |
|
|
# define CARLA_BACKEND_END_NAMESPACE } |
|
|
# define CARLA_BACKEND_USE_NAMESPACE using namespace CarlaBackend; |
|
|
# define CARLA_BACKEND_USE_NAMESPACE using namespace CarlaBackend; |
|
|
|
|
|
# include <algorithm> |
|
|
# include <cmath> |
|
|
# include <cmath> |
|
|
/* Start namespace */ |
|
|
/* Start namespace */ |
|
|
CARLA_BACKEND_START_NAMESPACE |
|
|
CARLA_BACKEND_START_NAMESPACE |
|
|
@@ -1453,7 +1454,12 @@ typedef struct { |
|
|
if (value >= 1.0f) |
|
|
if (value >= 1.0f) |
|
|
return max; |
|
|
return max; |
|
|
|
|
|
|
|
|
return min * std::pow(max/min, value); |
|
|
|
|
|
|
|
|
float rmin = min; |
|
|
|
|
|
|
|
|
|
|
|
if (std::abs(min) < std::numeric_limits<float>::epsilon()) |
|
|
|
|
|
rmin = 0.00001f; |
|
|
|
|
|
|
|
|
|
|
|
return rmin * std::pow(max/rmin, value); |
|
|
} |
|
|
} |
|
|
#endif /* __cplusplus */ |
|
|
#endif /* __cplusplus */ |
|
|
|
|
|
|
|
|
|