diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e936c6..0653ed8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,7 @@ set(FILES src/cpp/effects/ViPERClarity.cpp # Utils + src/cpp/utils/AdaptiveBuffer_F32.cpp src/cpp/utils/CAllpassFilter.cpp src/cpp/utils/CCombFilter.cpp src/cpp/utils/CRevModel.cpp diff --git a/src/cpp/ProcessUnit_FX.cpp b/src/cpp/ProcessUnit_FX.cpp index 672c4ae..5e7d7de 100644 --- a/src/cpp/ProcessUnit_FX.cpp +++ b/src/cpp/ProcessUnit_FX.cpp @@ -101,8 +101,8 @@ ProcessUnit_FX::ProcessUnit_FX() { this->speakerCorrection->SetSamplingRate(this->sampleRate); this->speakerCorrection->Reset(); - for (int i = 0; i < sizeof(softwareLimiters); i++) { - this->softwareLimiters[i] = new SoftwareLimiter(); + for (auto &softwareLimiter: this->softwareLimiters) { + softwareLimiter = new SoftwareLimiter(); // this->softwareLimiters[i]->ResetLimiter(); } @@ -190,10 +190,10 @@ ProcessUnit_FX::~ProcessUnit_FX() { delete this->speakerCorrection; this->speakerCorrection = nullptr; } - for (int i = 0; i < sizeof(softwareLimiters); i++) { - if (softwareLimiters[i] != nullptr) { - delete softwareLimiters[i]; - softwareLimiters[i] = nullptr; + for (auto &softwareLimiter: softwareLimiters) { + if (softwareLimiter != nullptr) { + delete softwareLimiter; + softwareLimiter = nullptr; } } } diff --git a/src/cpp/ProcessUnit_FX.h b/src/cpp/ProcessUnit_FX.h index e92fc0d..b6c3a1c 100644 --- a/src/cpp/ProcessUnit_FX.h +++ b/src/cpp/ProcessUnit_FX.h @@ -16,7 +16,7 @@ #include "effects/Cure.h" #include "effects/DiffSurround.h" #include "effects/VHE.h" -#include "effects/AdaptiveBuffer_F32.h" +#include "utils/AdaptiveBuffer_F32.h" #include "effects/Convolver.h" #include "effects/ViPERDDC.h" #include "effects/IIRFilter.h" diff --git a/src/cpp/utils/AdaptiveBuffer_F32.cpp b/src/cpp/utils/AdaptiveBuffer_F32.cpp new file mode 100644 index 0000000..b59928a --- /dev/null +++ b/src/cpp/utils/AdaptiveBuffer_F32.cpp @@ -0,0 +1,5 @@ +#include "AdaptiveBuffer_F32.h" + +AdaptiveBuffer_F32::AdaptiveBuffer_F32(int channels, uint32_t size) { + // TODO +} diff --git a/src/cpp/effects/AdaptiveBuffer_F32.h b/src/cpp/utils/AdaptiveBuffer_F32.h similarity index 100% rename from src/cpp/effects/AdaptiveBuffer_F32.h rename to src/cpp/utils/AdaptiveBuffer_F32.h