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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioBasicInspectorNode.cpp

Issue 2666063003: Continue to process AnalyserNode if inputs are silent. (Closed)
Patch Set: Add test Created 3 years, 11 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: third_party/WebKit/Source/modules/webaudio/AudioBasicInspectorNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBasicInspectorNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioBasicInspectorNode.cpp
index e1bed1d5e244a4a457395932f14b8f4925d0925d..3e08199ba33080b0072a4353ca6cee637ca39a11 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioBasicInspectorNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBasicInspectorNode.cpp
@@ -115,9 +115,13 @@ void AudioBasicInspectorHandler::updatePullStatus() {
// automatic pull list.
context()->deferredTaskHandler().addAutomaticPullNode(this);
m_needAutomaticPull = true;
- } else if (!numberOfInputConnections && m_needAutomaticPull) {
- // The AudioBasicInspectorNode is connected to nothing, remove it from the
- // context's automatic pull list.
+ } else if (!numberOfInputConnections && m_needAutomaticPull &&
+ getNodeType() != NodeTypeAnalyser) {
+ // The AudioBasicInspectorNode is connected to nothing and is
+ // not an AnalyserNode, remove it from the context's automatic
+ // pull list. AnalyserNode's need to be pulled even with no
+ // inputs so that the internal state gets updated to hold the
+ // right time and FFT data.
hongchan 2017/02/01 01:12:11 We should at least consider refactoring this metho
Raymond Toy 2017/02/01 21:21:01 Done. But a bit of duplication.
context()->deferredTaskHandler().removeAutomaticPullNode(this);
m_needAutomaticPull = false;
}

Powered by Google App Engine
This is Rietveld 408576698