Fix software limiter array loop

This commit is contained in:
Iscle 2022-08-24 09:44:23 +02:00
parent 2f2211821a
commit 77e0661d1f
5 changed files with 13 additions and 7 deletions

View File

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

View File

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

View File

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

View File

@ -0,0 +1,5 @@
#include "AdaptiveBuffer_F32.h"
AdaptiveBuffer_F32::AdaptiveBuffer_F32(int channels, uint32_t size) {
// TODO
}