Index: third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.cpp |
diff --git a/third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.cpp b/third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.cpp |
index 4fa90e749b8de7c4c34189e663e7acf4473a413b..ea02e24db2aae510f18558fa6751c89e21d72969 100644 |
--- a/third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.cpp |
+++ b/third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.cpp |
@@ -27,6 +27,7 @@ |
#include "modules/webaudio/AudioNodeOutput.h" |
#include "modules/webaudio/DynamicsCompressorNode.h" |
#include "modules/webaudio/DynamicsCompressorOptions.h" |
+#include "platform/audio/AudioUtilities.h" |
#include "platform/audio/DynamicsCompressor.h" |
#include "wtf/PtrUtil.h" |
@@ -97,6 +98,19 @@ void DynamicsCompressorHandler::process(size_t framesToProcess) { |
m_dynamicsCompressor->parameterValue(DynamicsCompressor::ParamReduction); |
} |
+void DynamicsCompressorHandler::processOnlyAudioParams(size_t framesToProcess) { |
+ DCHECK(context()->isAudioThread()); |
+ DCHECK_LE(framesToProcess, AudioUtilities::kRenderQuantumFrames); |
+ |
+ float values[AudioUtilities::kRenderQuantumFrames]; |
+ |
+ m_threshold->calculateSampleAccurateValues(values, framesToProcess); |
+ m_knee->calculateSampleAccurateValues(values, framesToProcess); |
+ m_ratio->calculateSampleAccurateValues(values, framesToProcess); |
+ m_attack->calculateSampleAccurateValues(values, framesToProcess); |
+ m_release->calculateSampleAccurateValues(values, framesToProcess); |
+} |
+ |
void DynamicsCompressorHandler::initialize() { |
if (isInitialized()) |
return; |