| Index: third_party/WebKit/Source/modules/webaudio/GainNode.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webaudio/GainNode.cpp b/third_party/WebKit/Source/modules/webaudio/GainNode.cpp
|
| index 190e61a54f713778a7dcb6c924c56d9dbe1af6c0..7f026769d2c3825cc433ab2c9408261899d2a5ff 100644
|
| --- a/third_party/WebKit/Source/modules/webaudio/GainNode.cpp
|
| +++ b/third_party/WebKit/Source/modules/webaudio/GainNode.cpp
|
| @@ -25,6 +25,7 @@
|
| #include "modules/webaudio/GainNode.h"
|
| #include "modules/webaudio/AudioNodeInput.h"
|
| #include "modules/webaudio/AudioNodeOutput.h"
|
| +#include "modules/webaudio/GainOptions.h"
|
| #include "platform/audio/AudioBus.h"
|
|
|
| namespace blink {
|
| @@ -138,6 +139,21 @@ GainNode* GainNode::create(BaseAudioContext& context, ExceptionState& exceptionS
|
| return new GainNode(context);
|
| }
|
|
|
| +GainNode* GainNode::create(BaseAudioContext* context, const GainOptions& options, ExceptionState& exceptionState)
|
| +{
|
| + GainNode* node = create(*context, exceptionState);
|
| +
|
| + if (!node)
|
| + return nullptr;
|
| +
|
| + node->handleChannelOptions(options, exceptionState);
|
| +
|
| + if (options.hasGain())
|
| + node->gain()->setValue(options.gain());
|
| +
|
| + return node;
|
| +}
|
| +
|
| AudioParam* GainNode::gain() const
|
| {
|
| return m_gain;
|
|
|