Index: third_party/WebKit/Source/modules/webaudio/DelayNode.cpp |
diff --git a/third_party/WebKit/Source/modules/webaudio/DelayNode.cpp b/third_party/WebKit/Source/modules/webaudio/DelayNode.cpp |
index 5e9a1414926b3d4ac3197607b31e7d1e82a15299..d9977be2a910bd09803b288095523edc137bb710 100644 |
--- a/third_party/WebKit/Source/modules/webaudio/DelayNode.cpp |
+++ b/third_party/WebKit/Source/modules/webaudio/DelayNode.cpp |
@@ -27,6 +27,7 @@ |
#include "core/dom/ExceptionCode.h" |
#include "modules/webaudio/AudioBasicProcessorHandler.h" |
#include "modules/webaudio/DelayNode.h" |
+#include "modules/webaudio/DelayOptions.h" |
#include "modules/webaudio/DelayProcessor.h" |
#include "wtf/MathExtras.h" |
#include "wtf/PtrUtil.h" |
@@ -83,6 +84,22 @@ DelayNode* DelayNode::create(BaseAudioContext& context, double maxDelayTime, Exc |
return new DelayNode(context, maxDelayTime); |
} |
+DelayNode* DelayNode::create(BaseAudioContext* context, const DelayOptions& options, ExceptionState& exceptionState) |
+{ |
+ // maxDelayTime has a default value specified. |
+ DelayNode* node = create(*context, options.maxDelayTime(), exceptionState); |
+ |
+ if (!node) |
+ return node; |
hongchan
2016/09/12 18:56:32
return nullptr;
|
+ |
+ node->handleChannelOptions(options, exceptionState); |
+ |
+ if (options.hasDelayTime()) |
+ node->delayTime()->setValue(options.delayTime()); |
+ |
+ return node; |
+} |
+ |
AudioParam* DelayNode::delayTime() |
{ |
return m_delayTime; |