diff --git a/common/DragonflyVersion.h b/common/DragonflyVersion.h index c800741..e22b369 100644 --- a/common/DragonflyVersion.h +++ b/common/DragonflyVersion.h @@ -16,5 +16,5 @@ #define MAJOR_VERSION 3 #define MINOR_VERSION 2 -#define PATCH_VERSION 1 +#define PATCH_VERSION 2 #define VERSION_SUFFIX "" diff --git a/plugins/dragonfly-early-reflections/DSP.cpp b/plugins/dragonfly-early-reflections/DSP.cpp index 6a64514..c2ec28a 100644 --- a/plugins/dragonfly-early-reflections/DSP.cpp +++ b/plugins/dragonfly-early-reflections/DSP.cpp @@ -31,7 +31,7 @@ DragonflyReverbDSP::DragonflyReverbDSP(double sampleRate) { for (uint32_t param = 0; param < paramCount; param++) { newParams[param] = DEFAULTS[param]; - oldParams[param] = FP_NAN; + oldParams[param] = std::nan(""); } sampleRateChanged(sampleRate); @@ -53,7 +53,7 @@ void DragonflyReverbDSP::setParameterValue(uint32_t index, float value) { void DragonflyReverbDSP::run(const float** inputs, float** outputs, uint32_t frames) { for (uint32_t index = 0; index < paramCount; index++) { - if (d_isNotEqual(oldParams[index], newParams[index])) { + if (std::isnan(oldParams[index]) || d_isNotEqual(oldParams[index], newParams[index])) { oldParams[index] = newParams[index]; float value = newParams[index]; @@ -67,7 +67,7 @@ void DragonflyReverbDSP::run(const float** inputs, float** outputs, uint32_t fra } if (index == paramProgram) { - model.loadPresetReflection(programs[(int)value].number); + model.loadPresetReflection(programs[(int)value].number); } } } @@ -90,12 +90,12 @@ void DragonflyReverbDSP::run(const float** inputs, float** outputs, uint32_t fra for (uint32_t i = 0; i < buffer_frames; i++) { outputs[0][offset + i] = - dry_level * inputs[0][offset + i] + - wet_level * output_buffer[0][i]; + dry_level * inputs[0][offset + i] + + wet_level * output_buffer[0][i]; outputs[1][offset + i] = - dry_level * inputs[1][offset + i] + - wet_level * output_buffer[1][i]; + dry_level * inputs[1][offset + i] + + wet_level * output_buffer[1][i]; } } diff --git a/plugins/dragonfly-early-reflections/DSP.hpp b/plugins/dragonfly-early-reflections/DSP.hpp index 9cc7c15..b3663dc 100644 --- a/plugins/dragonfly-early-reflections/DSP.hpp +++ b/plugins/dragonfly-early-reflections/DSP.hpp @@ -36,8 +36,8 @@ class DragonflyReverbDSP : public AbstractDSP { double sampleRate; - float dry_level; - float wet_level; + float dry_level = 0.0; + float wet_level = 0.0; static const uint32_t BUFFER_SIZE = 256; diff --git a/plugins/dragonfly-hall-reverb/DSP.cpp b/plugins/dragonfly-hall-reverb/DSP.cpp index f7f1e5d..b49ed5a 100644 --- a/plugins/dragonfly-hall-reverb/DSP.cpp +++ b/plugins/dragonfly-hall-reverb/DSP.cpp @@ -39,7 +39,7 @@ DragonflyReverbDSP::DragonflyReverbDSP(double sampleRate) { for (uint32_t param = 0; param < paramCount; param++) { newParams[param] = banks[DEFAULT_BANK].presets[DEFAULT_PRESET].params[param]; - oldParams[param] = FP_NAN; + oldParams[param] = std::nan(""); } } @@ -59,7 +59,7 @@ void DragonflyReverbDSP::setParameterValue(uint32_t index, float value) { void DragonflyReverbDSP::run(const float** inputs, float** outputs, uint32_t frames) { for (uint32_t index = 0; index < paramCount; index++) { - if (d_isNotEqual(oldParams[index], newParams[index])) { + if (std::isnan(oldParams[index]) || d_isNotEqual(oldParams[index], newParams[index])) { oldParams[index] = newParams[index]; float value = newParams[index]; diff --git a/plugins/dragonfly-plate-reverb/DSP.cpp b/plugins/dragonfly-plate-reverb/DSP.cpp index e1de34a..5714817 100644 --- a/plugins/dragonfly-plate-reverb/DSP.cpp +++ b/plugins/dragonfly-plate-reverb/DSP.cpp @@ -155,7 +155,7 @@ DragonflyReverbDSP::DragonflyReverbDSP(double sampleRate) { for (uint32_t param = 0; param < paramCount; param++) { newParams[param] = presets[DEFAULT_PRESET].params[param]; - oldParams[param] = FP_NAN; + oldParams[param] = std::nan(""); } sampleRateChanged(sampleRate); @@ -177,7 +177,7 @@ void DragonflyReverbDSP::setParameterValue(uint32_t index, float value) { void DragonflyReverbDSP::run(const float** inputs, float** outputs, uint32_t frames) { for (uint32_t index = 0; index < paramCount; index++) { - if (d_isNotEqual(oldParams[index], newParams[index])) { + if (std::isnan(oldParams[index]) || d_isNotEqual(oldParams[index], newParams[index])) { oldParams[index] = newParams[index]; float value = newParams[index]; diff --git a/plugins/dragonfly-plate-reverb/DSP.hpp b/plugins/dragonfly-plate-reverb/DSP.hpp index a760ae9..0660fe8 100644 --- a/plugins/dragonfly-plate-reverb/DSP.hpp +++ b/plugins/dragonfly-plate-reverb/DSP.hpp @@ -64,8 +64,8 @@ class DragonflyReverbDSP : public AbstractDSP { double sampleRate; - float dry_level; - float wet_level; + float dry_level = 0.0; + float wet_level = 0.0; static const uint32_t BUFFER_SIZE = 256; diff --git a/plugins/dragonfly-room-reverb/DSP.cpp b/plugins/dragonfly-room-reverb/DSP.cpp index 9c4da8b..17cd250 100644 --- a/plugins/dragonfly-room-reverb/DSP.cpp +++ b/plugins/dragonfly-room-reverb/DSP.cpp @@ -47,7 +47,7 @@ DragonflyReverbDSP::DragonflyReverbDSP(double sampleRate) { for (uint32_t param = 0; param < paramCount; param++) { newParams[param] = banks[DEFAULT_BANK].presets[DEFAULT_PRESET].params[param]; - oldParams[param] = FP_NAN; + oldParams[param] = std::nan(""); } sampleRateChanged(sampleRate); @@ -69,7 +69,7 @@ void DragonflyReverbDSP::setParameterValue(uint32_t index, float value) { void DragonflyReverbDSP::run(const float** inputs, float** outputs, uint32_t frames) { for (uint32_t index = 0; index < paramCount; index++) { - if (d_isNotEqual(oldParams[index], newParams[index])) { + if (std::isnan(oldParams[index]) || d_isNotEqual(oldParams[index], newParams[index])) { oldParams[index] = newParams[index]; float value = newParams[index]; diff --git a/plugins/dragonfly-room-reverb/DSP.hpp b/plugins/dragonfly-room-reverb/DSP.hpp index ae347a5..62be4fd 100644 --- a/plugins/dragonfly-room-reverb/DSP.hpp +++ b/plugins/dragonfly-room-reverb/DSP.hpp @@ -36,10 +36,10 @@ class DragonflyReverbDSP : public AbstractDSP { double sampleRate; - float dry_level; - float early_level; - float early_send; - float late_level; + float dry_level = 0.0; + float early_level = 0.0; + float early_send = 0.0; + float late_level = 0.0; fv3::iir_1st_f input_lpf_0, input_lpf_1, input_hpf_0, input_hpf_1;