Update some files

This commit is contained in:
Iscle 2022-08-23 14:59:08 +02:00
parent d4eaeb0932
commit 3fd428155e
4 changed files with 17 additions and 11 deletions

View File

@ -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

View File

@ -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;

View File

@ -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);
}
}
}

View File

@ -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 = {