diff --git a/_audio_effect_8h_source.html b/_audio_effect_8h_source.html
index f603d5cce4..587997c41e 100644
--- a/_audio_effect_8h_source.html
+++ b/_audio_effect_8h_source.html
@@ -497,94 +497,96 @@
- 524 float inSampleF = (float)inSample;
-
- 526 if (fabs(inSampleF) > threshold) {
- 527 if (gain >= gainreduce) {
- 528 if (state==S_NoOperation) {
-
- 530 timeout = attack_count;
-
- 532 else if (state==S_Release) {
-
- 534 timeout = attack_count;
-
-
- 537 if (state==S_GainReduction) timeout = hold_count;
-
-
-
- 541 if (fabs(inSampleF) < threshold && gain <= 1.0f) {
- 542 if ( timeout==0 && state==S_GainReduction) {
-
- 544 timeout = release_count;
-
-
-
-
-
- 550 if ( timeout>0 && gain > gainreduce) {
- 551 gain -= gain_step_attack;
-
-
-
- 555 state=S_GainReduction;
- 556 timeout = hold_count;
-
-
-
-
- 561 case S_GainReduction:
- 562 if ( timeout>0) timeout--;
-
-
- 565 timeout = release_count;
-
-
-
-
-
- 571 if ( timeout>0 && gain<1.0f) {
-
- 573 gain += gain_step_release;
+ 524 return compress(inSample);
+
+
+
+
+
+ 530 enum CompStates {S_NoOperation, S_Attack, S_GainReduction, S_Release };
+ 531 enum CompStates state = S_NoOperation;
+
+ 533 int32_t attack_count, release_count, hold_count, timeout;
+ 534 float gainreduce, gain_step_attack, gain_step_release, gain, threshold;
+ 535 uint32_t sample_rate;
+
+
+ 538 gain_step_attack = (1.0f - gainreduce) / attack_count;
+ 539 gain_step_release = (1.0f - gainreduce) / release_count;
+
+
+ 542 float compress(
float inSampleF){
+ 543 if (fabs(inSampleF) > threshold) {
+ 544 if (gain >= gainreduce) {
+ 545 if (state==S_NoOperation) {
+
+ 547 timeout = attack_count;
+
+ 549 else if (state==S_Release) {
+
+ 551 timeout = attack_count;
+
+
+ 554 if (state==S_GainReduction) timeout = hold_count;
+
+
+
+ 558 if (fabs(inSampleF) < threshold && gain <= 1.0f) {
+ 559 if ( timeout==0 && state==S_GainReduction) {
+
+ 561 timeout = release_count;
+
+
+
+
+
+ 567 if ( timeout>0 && gain > gainreduce) {
+ 568 gain -= gain_step_attack;
+
+
+
+ 572 state=S_GainReduction;
+ 573 timeout = hold_count;
-
-
-
-
-
-
- 581 if (gain < 1.0f) gain = 1.0f;
-
-
-
-
+
+
+
+ 578 case S_GainReduction:
+ 579 if ( timeout>0) timeout--;
+
+
+ 582 timeout = release_count;
+
+
+
-
-
- 589 float outSampleF = gain * inSample;
-
-
-
-
-
-
- 596 enum CompStates {S_NoOperation, S_Attack, S_GainReduction, S_Release };
- 597 enum CompStates state = S_NoOperation;
-
- 599 int32_t attack_count, release_count, hold_count, timeout;
- 600 float gainreduce, gain_step_attack, gain_step_release, gain, threshold;
- 601 uint32_t sample_rate;
-
-
- 604 gain_step_attack = (1.0f - gainreduce) / attack_count;
- 605 gain_step_release = (1.0f - gainreduce) / release_count;
-
-
-
+
+ 588 if ( timeout>0 && gain<1.0f) {
+
+ 590 gain += gain_step_release;
+
+
+
+
+
+
+
+ 598 if (gain < 1.0f) gain = 1.0f;
+
+
+
+
+
+
+
+ 606 float outSampleF = gain * inSampleF;
+
+
-
-
+
+
+
+
diff --git a/classaudio__tools_1_1_compressor-members.html b/classaudio__tools_1_1_compressor-members.html
index ba50428a57..e372aca1c9 100644
--- a/classaudio__tools_1_1_compressor-members.html
+++ b/classaudio__tools_1_1_compressor-members.html
@@ -78,36 +78,37 @@
AudioEffect()=default (defined in AudioEffect) | AudioEffect | |
clip(int32_t in, int16_t clipLimit=32767, int16_t resultLimit=32767) | AudioEffect | inlineprotected |
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 |
- S_GainReduction enum value (defined in Compressor) | Compressor | protected |
- S_NoOperation enum value (defined in Compressor) | Compressor | protected |
- S_Release enum value (defined in Compressor) | Compressor | protected |
- sample_rate (defined in Compressor) | Compressor | protected |
- setActive(bool value) | AudioEffect | inlinevirtual |
- 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 |
+ compress(float inSampleF) (defined in Compressor) | Compressor | inlineprotected |
+ 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 |
+ S_GainReduction enum value (defined in Compressor) | Compressor | protected |
+ S_NoOperation enum value (defined in Compressor) | Compressor | protected |
+ S_Release enum value (defined in Compressor) | Compressor | protected |
+ sample_rate (defined in Compressor) | Compressor | protected |
+ setActive(bool value) | AudioEffect | inlinevirtual |
+ 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 |