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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AnalyserNode.h

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
Index: third_party/WebKit/Source/modules/webaudio/AnalyserNode.h
diff --git a/third_party/WebKit/Source/modules/webaudio/AnalyserNode.h b/third_party/WebKit/Source/modules/webaudio/AnalyserNode.h
index 6c80967316f6ae626f740f60e3d65b1923d5e0e8..5fc6fbff3e71cdb43cd34fd7fa2c04dbae48434a 100644
--- a/third_party/WebKit/Source/modules/webaudio/AnalyserNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/AnalyserNode.h
@@ -75,8 +75,20 @@ class AnalyserHandler final : public AudioBasicInspectorHandler {
m_analyser.getByteTimeDomainData(array);
}
+ // AnalyserNode needs special handling when updating the pull status
+ // because the node must get pulled even if there are no inputs or
+ // outputs so that the internal state is properly updated with the
+ // correct time data.
+ void updatePullStatus() override;
+
private:
AnalyserHandler(AudioNode&, float sampleRate);
+ bool propagatesSilence() const {
+ // An AnalyserNode does actually propogate silence, but to get the
+ // time and FFT data updated correctly, process() needs to be
+ // called even if all the inputs are silent.
+ return false;
+ }
RealtimeAnalyser m_analyser;
};

Powered by Google App Engine
This is Rietveld 408576698