mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-08 04:32:00 +01:00
Added dB - linear amplitude conversion macros.
This commit is contained in:
@@ -328,8 +328,8 @@ bool EffectCompressor::TransferDataFromWindow()
|
||||
|
||||
bool EffectCompressor::NewTrackPass1()
|
||||
{
|
||||
mThreshold = pow(10.0, mThresholdDB/20); // factor of 20 because it's power
|
||||
mNoiseFloor = pow(10.0, mNoiseFloorDB/20);
|
||||
mThreshold = DB_TO_LINEAR(mThresholdDB);
|
||||
mNoiseFloor = DB_TO_LINEAR(mNoiseFloorDB);
|
||||
mNoiseCounter = 100;
|
||||
|
||||
mAttackInverseFactor = exp(log(mThreshold) / (mCurRate * mAttackTime + 0.5));
|
||||
|
||||
Reference in New Issue
Block a user