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

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

Issue 2582443004: ScriptProcessor buffer size should be consistent with callback size (Closed)
Patch Set: Make callbackBufferSize pure virtual 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 65a6743a8735f02c9bceacd867699c71dd82d128..1aa09a97046d2d4f0c96a0e752069827e3798eba 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.h
@@ -66,6 +66,9 @@ class AudioDestinationHandler : public AudioHandler, public AudioIOCallback {
virtual void startRendering() = 0;
virtual void stopRendering() = 0;
+ // Returns the rendering callback buffer size.
+ virtual size_t callbackBufferSize() const = 0;
+
protected:
// LocalAudioInputProvider allows us to expose an AudioSourceProvider for
// local/live audio input. If there is local/live audio input, we call set()
@@ -112,6 +115,7 @@ class AudioDestinationNode : public AudioNode {
AudioDestinationHandler& audioDestinationHandler() const;
unsigned long maxChannelCount() const;
+ size_t callbackBufferSize() const { return handler().callbackBufferSize(); }
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