Merge pull request #11240 from kencooke/audio-gate-threshold

More aggressive noise gate threshold
This commit is contained in:
Chris Collins 2017-08-24 14:49:18 -07:00 committed by GitHub
commit c0afda859f
2 changed files with 10 additions and 10 deletions

View file

@ -25,10 +25,10 @@ static inline int32_t saturateQ30(int32_t x) {
} }
// //
// First-order DC-blocking filter, with zero at 1.0 and pole at 0.99994 // First-order DC-blocking filter, with zero at 1.0 and pole at 0.9999
// //
// -3dB @ 0.5 Hz (48KHz) // -3dB @ 1.0 Hz (48KHz)
// -3dB @ 0.2 Hz (24KHz) // -3dB @ 0.5 Hz (24KHz)
// //
// input in Q15, output in Q30 // input in Q15, output in Q30
// //
@ -41,7 +41,7 @@ public:
x <<= 15; // scale to Q30 x <<= 15; // scale to Q30
x -= _dcOffset; // remove DC x -= _dcOffset; // remove DC
_dcOffset += x >> 14; // pole = (1.0 - 2^-14) = 0.99994 _dcOffset += x >> 13; // pole = (1.0 - 2^-13) = 0.9999
} }
}; };
@ -147,10 +147,10 @@ GateImpl::GateImpl(int sampleRate) {
_sampleRate = sampleRate; _sampleRate = sampleRate;
// defaults // defaults
setThreshold(-36.0); setThreshold(-30.0f);
setHold(20.0); setHold(20.0f);
setHysteresis(6.0); setHysteresis(6.0f);
setRelease(1000.0); setRelease(1000.0f);
} }
// //

View file

@ -52,8 +52,8 @@ LimiterImpl::LimiterImpl(int sampleRate) {
_sampleRate = sampleRate; _sampleRate = sampleRate;
// defaults // defaults
setThreshold(0.0); setThreshold(0.0f);
setRelease(250.0); setRelease(250.0f);
} }
// //