diff --git a/_audio_effect_8h_source.html b/_audio_effect_8h_source.html
index a220fe6c07..60d1ca1796 100644
--- a/_audio_effect_8h_source.html
+++ b/_audio_effect_8h_source.html
@@ -448,10 +448,10 @@
-
-
+
+
- 472 Compressor(uint32_t sampleRate = 44100, int32_t attackMs=30, int32_t releaseMs=20, int32_t holdMs=10, uint8_t thresholdPercent=10,
float compressionRatio=0.5){
+ 472 Compressor(uint32_t sampleRate = 44100, int32_t attackMs=30, int32_t releaseMs=20, int32_t holdMs=10, uint8_t thresholdPercent=10,
float compressionRatio=0.5){
@@ -470,33 +470,33 @@
- 492 void setAttack(int32_t attackMs){
+
493 attack_count = sample_rate * attackMs / 1000;
- 498 void setRelease(int32_t releaseMs){
+
499 release_count = sample_rate * releaseMs / 1000;
- 504 void setHold(int32_t holdMs){
+
505 hold_count = sample_rate * holdMs / 1000;
- 510 void setThresholdPercent(uint8_t thresholdPercent){
+
511 threshold = 0.01f * thresholdPercent * NumberConverter::maxValueT<effect_t>();
- 515 void setCompressionRatio(
float compressionRatio){
+
516 if (compressionRatio<1.0){
517 gainreduce = compressionRatio;
- 523 effect_t process(effect_t inSample) {
+
524 float inSampleF = (float)inSample;
526 if (fabs(inSampleF) > threshold) {
@@ -568,7 +568,7 @@
592 return (
int) outSampleF;
-
+
598 enum CompStates {S_NoOperation, S_Attack, S_GainReduction, S_Release };
@@ -601,6 +601,14 @@
+
+
+
+
+
+
+
+
diff --git a/classaudio__tools_1_1_compressor-members.html b/classaudio__tools_1_1_compressor-members.html
index 8313b819a1..00ce5dbc75 100644
--- a/classaudio__tools_1_1_compressor-members.html
+++ b/classaudio__tools_1_1_compressor-members.html
@@ -77,15 +77,19 @@
attack_count (defined in Compressor) | Compressor | protected |
AudioEffect()=default (defined in AudioEffect) | AudioEffect | |
clip(int32_t in, int16_t clipLimit=32767, int16_t resultLimit=32767) | AudioEffect | inlineprotected |
- CompStates enum name (defined in Compressor) | Compressor | protected |
- copyParent(AudioEffect *copy) (defined in AudioEffect) | AudioEffect | inlineprotected |
- gain (defined in Compressor) | Compressor | protected |
- gain_step_attack (defined in Compressor) | Compressor | protected |
- gain_step_release (defined in Compressor) | Compressor | protected |
- gainreduce (defined in Compressor) | Compressor | protected |
- hold_count (defined in Compressor) | Compressor | protected |
- id() | AudioEffect | inline |
- id_value (defined in AudioEffect) | AudioEffect | protected |
+ clone() (defined in Compressor) | Compressor | inlinevirtual |
+ Compressor(const Compressor ©)=default | Compressor | |
+ Compressor(uint32_t sampleRate=44100, int32_t attackMs=30, int32_t releaseMs=20, int32_t holdMs=10, uint8_t thresholdPercent=10, float compressionRatio=0.5) | Compressor | inline |
+ CompStates enum name (defined in Compressor) | Compressor | protected |
+ copyParent(AudioEffect *copy) (defined in AudioEffect) | AudioEffect | inlineprotected |
+ gain (defined in Compressor) | Compressor | protected |
+ gain_step_attack (defined in Compressor) | Compressor | protected |
+ gain_step_release (defined in Compressor) | Compressor | protected |
+ gainreduce (defined in Compressor) | Compressor | protected |
+ hold_count (defined in Compressor) | Compressor | protected |
+ id() | AudioEffect | inline |
+ id_value (defined in AudioEffect) | AudioEffect | protected |
+ process(effect_t inSample) | Compressor | inlinevirtual |
recalculate() (defined in Compressor) | Compressor | inlineprotected |
release_count (defined in Compressor) | Compressor | protected |
S_Attack enum value (defined in Compressor) | Compressor | protected |
@@ -94,11 +98,16 @@
S_Release enum value (defined in Compressor) | Compressor | protected |
sample_rate (defined in Compressor) | Compressor | protected |
setActive(bool value) | AudioEffect | inlinevirtual |
- setId(int id) | AudioEffect | inline |
- State (defined in Compressor) | Compressor | protected |
- threshold (defined in Compressor) | Compressor | protected |
- timeout (defined in Compressor) | Compressor | protected |
- ~AudioEffect()=default (defined in AudioEffect) | AudioEffect | virtual |
+ setAttack(int32_t attackMs) | Compressor | inline |
+ setCompressionRatio(float compressionRatio) | Compressor | inline |
+ setHold(int32_t holdMs) | Compressor | inline |
+ setId(int id) | AudioEffect | inline |
+ setRelease(int32_t releaseMs) | Compressor | inline |
+ setThresholdPercent(uint8_t thresholdPercent) | Compressor | inline |
+ State (defined in Compressor) | Compressor | protected |
+ threshold (defined in Compressor) | Compressor | protected |
+ timeout (defined in Compressor) | Compressor | protected |
+ ~AudioEffect()=default (defined in AudioEffect) | AudioEffect | virtual |