Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(776)

Unified Diff: Source/modules/webaudio/AudioNode.cpp

Issue 645853010: Make reduction value of dynamics compressor zero when no sources are connected (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git/+/master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/webaudio/AudioNode.cpp
diff --git a/Source/modules/webaudio/AudioNode.cpp b/Source/modules/webaudio/AudioNode.cpp
index 8febafca9ef112741842e3825fe0ce89013884e3..9519ad52b010b81c87ac31de28fc2471e6e55d74 100644
--- a/Source/modules/webaudio/AudioNode.cpp
+++ b/Source/modules/webaudio/AudioNode.cpp
@@ -89,6 +89,10 @@ void AudioNode::uninitialize()
m_isInitialized = false;
}
+void AudioNode::clearInternalState()
+{
+}
+
void AudioNode::dispose()
{
ASSERT(isMainThread());
@@ -475,6 +479,10 @@ void AudioNode::disableOutputsIfNecessary()
// longer any active connections.
if (nodeType() != NodeTypeConvolver && nodeType() != NodeTypeDelay) {
m_isDisabled = true;
+ // Resets internal states for future external data request. (i.e. Gain reduction)
Raymond Toy 2014/10/21 20:47:57 I think I would remove this comment. The comment
hongchan 2014/10/21 20:58:53 Acknowledged.
+ if (nodeType() == NodeTypeDynamicsCompressor) {
Raymond Toy 2014/10/21 20:47:57 This if test isn't needed. Every node now has a c
hongchan 2014/10/21 20:58:53 I agree, but this was what we talked about it befo
+ clearInternalState();
+ }
for (unsigned i = 0; i < m_outputs.size(); ++i)
output(i)->disable();
}

Powered by Google App Engine
This is Rietveld 408576698