diff --git a/src/cpp/constants.h b/src/cpp/constants.h index f29c2d3..d66321f 100644 --- a/src/cpp/constants.h +++ b/src/cpp/constants.h @@ -16,6 +16,6 @@ #define STR_HELPER(x) #x #define STR(x) STR_HELPER(x) -#define VERSION_STRING STR(VERSION_MAJOR) "." STR(VERSION_MINOR) "." STR(VERSION_REVISION) "." STR(VERSION_BUILD) +#define VERSION_STRING "v" STR(VERSION_MAJOR) "." STR(VERSION_MINOR) #define DEFAULT_SAMPLERATE 44100 \ No newline at end of file diff --git a/src/cpp/effects/TubeSimulator.cpp b/src/cpp/effects/TubeSimulator.cpp index ae0e8ed..3e2441b 100644 --- a/src/cpp/effects/TubeSimulator.cpp +++ b/src/cpp/effects/TubeSimulator.cpp @@ -17,7 +17,7 @@ void TubeSimulator::Reset() { } void TubeSimulator::TubeProcess(float *buffer, uint32_t size) { - if (this->enabled && size > 0) { + if (this->enabled) { for (int x = 0; x < size; x++) { this->acc[0] = (this->acc[0] + buffer[2 * x]) / 2.f; this->acc[1] = (this->acc[1] + buffer[2 * x + 1]) / 2.f; diff --git a/src/cpp/effects/ViPERClarity.cpp b/src/cpp/effects/ViPERClarity.cpp index a0ddb08..0955d03 100644 --- a/src/cpp/effects/ViPERClarity.cpp +++ b/src/cpp/effects/ViPERClarity.cpp @@ -22,15 +22,21 @@ ViPERClarity::ViPERClarity() { void ViPERClarity::Process(float *samples, uint32_t size) { if (this->enabled) { - if (this->processMode == ClarityMode::NATURAL) { - this->sharp.Process(samples, size); - } else if (this->processMode == ClarityMode::OZONE) { - for (int i = 0; i < size * 2; i++) { - samples[i] = this->hiShelf[i % 2].Process(samples[i]); + switch (this->processMode) { + case ClarityMode::NATURAL: { + this->sharp.Process(samples, size); + break; + } + case ClarityMode::OZONE: { + for (int i = 0; i < size * 2; i++) { + samples[i] = this->hiShelf[i % 2].Process(samples[i]); + } + break; + } + case ClarityMode::XHIFI: { + this->hifi.Process(samples, size); + break; } - } else { - // ClarityMode::XHIFI - this->hifi.Process(samples, size); } } } diff --git a/src/cpp/viper.cpp b/src/cpp/viper.cpp index 13e82ce..97730d5 100644 --- a/src/cpp/viper.cpp +++ b/src/cpp/viper.cpp @@ -4,7 +4,7 @@ #include "constants.h" #include "log.h" -#define EFFECT_NAME "ViPER4Android Reworked [" VERSION_STRING "]" +#define EFFECT_NAME "ViPER4Android Reworked " VERSION_STRING #define EFFECT_IMPLEMENTOR "ViPER.WYF, Martmists, Iscle" static effect_descriptor_t viper_descriptor = {