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

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

Issue 2582443004: ScriptProcessor buffer size should be consistent with callback size (Closed)
Patch Set: Created 4 years 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 | « no previous file | third_party/WebKit/Source/modules/webaudio/AudioNode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.h
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.h b/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.h
index dc7fe45b785aa4c552a80638aed3a35d425c3ec1..8503cbe966cfe64e549770861f55a165d5534de6 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.h
@@ -65,6 +65,8 @@ class AudioDestinationHandler : public AudioHandler, public AudioIOCallback {
virtual void startRendering() = 0;
virtual void stopRendering() = 0;
+ virtual size_t callbackBufferSize() const { return 0; }
hongchan 2016/12/20 20:35:13 The comment is needed here. We have many 'callback
Raymond Toy 2016/12/20 21:55:31 Done. And also made it pure virtual as we discuss
+
protected:
// LocalAudioInputProvider allows us to expose an AudioSourceProvider for
// local/live audio input. If there is local/live audio input, we call set()
@@ -111,6 +113,7 @@ class AudioDestinationNode : public AudioNode {
AudioDestinationHandler& audioDestinationHandler() const;
unsigned long maxChannelCount() const;
+ size_t callbackBufferSize() const { return handler().callbackBufferSize(); }
hongchan 2016/12/20 20:35:12 Just curious: does this change dynamically? if not
Raymond Toy 2016/12/20 21:55:31 Don't think this can change dynamically. Might be
protected:
AudioDestinationNode(BaseAudioContext&);
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/AudioNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698