Index: third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h |
diff --git a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h |
index 028ff3e9bb670b6388e9f3fdcf543aca528f0304..fe90872d2fedd50a487db66a4211df7d38af7ff4 100644 |
--- a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h |
+++ b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h |
@@ -52,6 +52,7 @@ class AnalyserNode; |
class AudioBuffer; |
class AudioBufferCallback; |
class AudioBufferSourceNode; |
+class AudioContextOptions; |
class AudioListener; |
class BaseAudioContextTest; |
class BiquadFilterNode; |
@@ -100,7 +101,9 @@ class MODULES_EXPORT BaseAudioContext : public EventTargetWithInlineData, |
enum AudioContextState { Suspended, Running, Closed }; |
// Create an AudioContext for rendering to the audio hardware. |
- static BaseAudioContext* create(Document&, ExceptionState&); |
+ static BaseAudioContext* create(Document&, |
+ const AudioContextOptions&, |
+ ExceptionState&); |
~BaseAudioContext() override; |
@@ -137,7 +140,15 @@ class MODULES_EXPORT BaseAudioContext : public EventTargetWithInlineData, |
} |
float sampleRate() const { |
- return m_destinationNode ? m_destinationNode->handler().sampleRate() : 0; |
+ return m_destinationNode |
+ ? m_destinationNode->audioDestinationHandler().sampleRate() |
+ : closedContextSampleRate(); |
+ } |
+ |
+ float framesPerBuffer() const { |
+ return m_destinationNode |
+ ? m_destinationNode->audioDestinationHandler().framesPerBuffer() |
+ : 0; |
} |
String state() const; |