Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp |
| diff --git a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp |
| index 020e539047db244fcc9878bc8f9e5da1fe0beefa..ef5124438574cc2776fe893481e9cc0bd8f1c517 100644 |
| --- a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp |
| +++ b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp |
| @@ -44,6 +44,7 @@ |
| #include "modules/webaudio/AudioBufferCallback.h" |
| #include "modules/webaudio/AudioBufferSourceNode.h" |
| #include "modules/webaudio/AudioContext.h" |
| +#include "modules/webaudio/AudioContextOptions.h" |
| #include "modules/webaudio/AudioListener.h" |
| #include "modules/webaudio/AudioNodeInput.h" |
| #include "modules/webaudio/AudioNodeOutput.h" |
| @@ -75,20 +76,24 @@ |
| #include "platform/UserGestureIndicator.h" |
| #include "platform/audio/IIRFilter.h" |
| #include "public/platform/Platform.h" |
| +#include "public/platform/WebAudioLatencyHint.h" |
| #include "wtf/text/WTFString.h" |
| namespace blink { |
| -BaseAudioContext* BaseAudioContext::create(Document& document, |
| - ExceptionState& exceptionState) { |
| - return AudioContext::create(document, exceptionState); |
| +BaseAudioContext* BaseAudioContext::create( |
| + Document& document, |
| + const WebAudioLatencyHint& latencyHint, |
|
Raymond Toy
2016/11/15 18:16:17
Since OfflineAudioContext does not have a latency
Andrew MacPherson
2016/11/16 10:58:29
I think we need the latencyHint value to be passed
|
| + ExceptionState& exceptionState) { |
| + return AudioContext::create(document, latencyHint, exceptionState); |
| } |
| // FIXME(dominicc): Devolve these constructors to AudioContext |
| // and OfflineAudioContext respectively. |
| // Constructor for rendering to the audio hardware. |
| -BaseAudioContext::BaseAudioContext(Document* document) |
| +BaseAudioContext::BaseAudioContext(Document* document, |
| + const WebAudioLatencyHint& latencyHint) |
| : ActiveScriptWrappable(this), |
| ActiveDOMObject(document), |
| m_destinationNode(nullptr), |
| @@ -112,7 +117,7 @@ BaseAudioContext::BaseAudioContext(Document* document) |
| m_userGestureRequired = true; |
| } |
| - m_destinationNode = DefaultAudioDestinationNode::create(this); |
| + m_destinationNode = DefaultAudioDestinationNode::create(this, latencyHint); |
| initialize(); |
| } |