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

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

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.h
diff --git a/Source/modules/webaudio/AudioNode.h b/Source/modules/webaudio/AudioNode.h
index 91d368353e26ed52ef03b2f56d4b0dbfb02eae97..ebe11a520819fabfb9736b2eb93b565e17b93615 100644
--- a/Source/modules/webaudio/AudioNode.h
+++ b/Source/modules/webaudio/AudioNode.h
@@ -120,6 +120,14 @@ public:
virtual void initialize();
virtual void uninitialize();
+ // Clear internal state when the node is disabled. When a node is disabled,
+ // it is no longer pulled so any internal state is never updated. But some
+ // nodes (DynamicsCompressorNode) have internal state that is still
+ // accessible by the user. Update the internal state as if the node were
+ // still connected but processing all zeroes. This gives a consistent view
+ // to the user.
+ virtual void clearInternalStateWhenDisabled();
+
bool isInitialized() const { return m_isInitialized; }
unsigned numberOfInputs() const { return m_inputs.size(); }
« no previous file with comments | « LayoutTests/webaudio/dynamicscompressor-clear-internal-state-expected.txt ('k') | Source/modules/webaudio/AudioNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698