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

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

Issue 1285073005: Add special case handling for disconnected BiquadFilter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix typo in expected results. Created 5 years, 4 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 | « LayoutTests/webaudio/biquad-tail-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioNode.cpp
diff --git a/Source/modules/webaudio/AudioNode.cpp b/Source/modules/webaudio/AudioNode.cpp
index 2c9582ee482a0e5019b5c8a889cabcc88e9627c0..60f3edcd1461f3db5fce6cc4ccf95bab0f528278 100644
--- a/Source/modules/webaudio/AudioNode.cpp
+++ b/Source/modules/webaudio/AudioNode.cpp
@@ -412,11 +412,14 @@ void AudioHandler::disableOutputsIfNecessary()
// But internally our outputs should be disabled from the inputs they're connected to.
// disable() can recursively deref connections (and call disable()) down a whole chain of connected nodes.
- // FIXME: we special case the convolver and delay since they have a significant tail-time and shouldn't be disconnected simply
- // because they no longer have any input connections. 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.
- if (nodeType() != NodeTypeConvolver && nodeType() != NodeTypeDelay) {
+ // TODO(rtoy,hongchan): we special case the convolver, delay, and biquad since they have a
+ // significant tail-time and shouldn't be disconnected simply because they no longer have
+ // any input connections. 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.
+ if (nodeType() != NodeTypeConvolver
+ && nodeType() != NodeTypeDelay
+ && nodeType() != NodeTypeBiquadFilter) {
m_isDisabled = true;
clearInternalStateWhenDisabled();
for (auto& output : m_outputs)
« no previous file with comments | « LayoutTests/webaudio/biquad-tail-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698