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

Unified Diff: third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.cpp

Issue 2102133002: Add constructors for WebAudio nodes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and prefix use counter names with WebAudio Created 4 years, 3 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/ChannelSplitterNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.cpp b/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.cpp
index 35aafaca1cb9b43f460e4f7036ff48352cbd7df6..6795efb17ecd835893dd07b7544817af99f88eca 100644
--- a/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.cpp
@@ -29,6 +29,7 @@
#include "modules/webaudio/AudioNodeInput.h"
#include "modules/webaudio/AudioNodeOutput.h"
#include "modules/webaudio/BaseAudioContext.h"
+#include "modules/webaudio/ChannelSplitterOptions.h"
namespace blink {
@@ -113,5 +114,17 @@ ChannelSplitterNode* ChannelSplitterNode::create(BaseAudioContext& context, unsi
return new ChannelSplitterNode(context, numberOfOutputs);
}
+ChannelSplitterNode* ChannelSplitterNode::create(BaseAudioContext* context, const ChannelSplitterOptions& options, ExceptionState& exceptionState)
+{
+ ChannelSplitterNode* node = create(*context, options.numberOfOutputs(), exceptionState);
+
+ if (!node)
+ return nullptr;
+
+ node->handleChannelOptions(options, exceptionState);
+
+ return node;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698