Index: third_party/WebKit/Source/platform/audio/DynamicsCompressorKernel.cpp |
diff --git a/third_party/WebKit/Source/platform/audio/DynamicsCompressorKernel.cpp b/third_party/WebKit/Source/platform/audio/DynamicsCompressorKernel.cpp |
index ce9bd1c0c503c1319fe13f7b614b2c921baa5324..59bbacdf70113111eca0be2f1501e44e5d74d806 100644 |
--- a/third_party/WebKit/Source/platform/audio/DynamicsCompressorKernel.cpp |
+++ b/third_party/WebKit/Source/platform/audio/DynamicsCompressorKernel.cpp |
@@ -495,4 +495,16 @@ void DynamicsCompressorKernel::Reset() { |
max_attack_compression_diff_db_ = -1; // uninitialized state |
} |
+double DynamicsCompressorKernel::TailTime() const { |
+ // The reduction value of the compressor is computed from the gain |
+ // using an exponential filter with a time constant of |
+ // |kMeteringReleaseTimeConstant|. We need to keep he compressor |
+ // running for some time after the inputs go away so that the |
+ // reduction value approaches 0. This is a tradeoff between how |
+ // long we keep the node alive and how close we approach the final |
+ // value. A value of 5 to 10 times the time constant is a |
+ // reasonable trade-off. |
+ return 5 * kMeteringReleaseTimeConstant; |
+} |
+ |
} // namespace blink |