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

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

Issue 2666063003: Continue to process AnalyserNode if inputs are silent. (Closed)
Patch Set: Adjust comment per review. Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/AudioBasicInspectorNode.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
index c2c0dcf494ae24892e6a15eb1b67efcfa5f5487b..a59f547aa093f82e6fe236a8df751a305c2fc187 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
@@ -429,9 +429,14 @@ void AudioHandler::disableOutputsIfNecessary() {
// This needs to be handled more generally where AudioNodes have a tailTime
// attribute. Then the AudioNode only needs to remain "active" for tailTime
// seconds after there are no longer any active connections.
+ //
+ // The analyser node also requires special handling because we
+ // need the internal state to be updated for the time and FFT data
+ // even if it has no connections.
if (getNodeType() != NodeTypeConvolver && getNodeType() != NodeTypeDelay &&
getNodeType() != NodeTypeBiquadFilter &&
- getNodeType() != NodeTypeIIRFilter) {
+ getNodeType() != NodeTypeIIRFilter &&
+ getNodeType() != NodeTypeAnalyser) {
m_isDisabled = true;
clearInternalStateWhenDisabled();
for (auto& output : m_outputs)
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/AudioBasicInspectorNode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698