Improvements to AGC limiting
This commit is contained in:
@@ -47,6 +47,7 @@ public class AGC implements Effect {
|
|||||||
|
|
||||||
gain += factor;
|
gain += factor;
|
||||||
if (gain > limit) gain = limit;
|
if (gain > limit) gain = limit;
|
||||||
|
if (gain < 0) gain = 0;
|
||||||
|
|
||||||
samples[i][Sentence.LEFT] *= gain;
|
samples[i][Sentence.LEFT] *= gain;
|
||||||
samples[i][Sentence.RIGHT] *= gain;
|
samples[i][Sentence.RIGHT] *= gain;
|
||||||
|
|||||||
Reference in New Issue
Block a user