2022-09-25 01:28:56 +02:00
|
|
|
#include <cstring>
|
2022-08-30 00:39:15 +02:00
|
|
|
#include "SoftwareLimiter.h"
|
2022-09-06 17:57:23 +02:00
|
|
|
|
|
|
|
SoftwareLimiter::SoftwareLimiter() {
|
2022-09-25 01:28:56 +02:00
|
|
|
this->ready = false;
|
|
|
|
this->unknown4 = 0;
|
|
|
|
this->unknown2 = 1.0;
|
|
|
|
this->gate = 0.999999;
|
|
|
|
this->unknown3 = 1.0;
|
|
|
|
this->unknown1 = 1.0;
|
|
|
|
this->ResetLimiter();
|
2022-09-06 17:57:23 +02:00
|
|
|
}
|
|
|
|
|
2022-10-06 03:37:22 +02:00
|
|
|
float SoftwareLimiter::Process(float sample) {
|
|
|
|
return sample;
|
2022-09-06 17:57:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void SoftwareLimiter::ResetLimiter() {
|
2022-09-25 01:28:56 +02:00
|
|
|
memset(this->arr256, 0, 256);
|
|
|
|
memset(this->arr512, 0, 512);
|
|
|
|
this->ready = false;
|
|
|
|
this->unknown4 = 0;
|
|
|
|
this->unknown2 = 1.0;
|
|
|
|
this->unknown3 = 1.0;
|
2022-09-06 17:57:23 +02:00
|
|
|
}
|
|
|
|
|
2022-09-25 01:28:56 +02:00
|
|
|
void SoftwareLimiter::SetGate(float gate) {
|
|
|
|
this->gate = gate;
|
2022-09-06 17:57:23 +02:00
|
|
|
}
|