Chromium Code Reviews| Index: third_party/WebKit/Source/platform/audio/AudioDestination.h |
| diff --git a/third_party/WebKit/Source/platform/audio/AudioDestination.h b/third_party/WebKit/Source/platform/audio/AudioDestination.h |
| index dda3527f57476e3697025958418f64c07573959d..f2fe616b8be5ea76fde765340a9b0f7cefb7d835 100644 |
| --- a/third_party/WebKit/Source/platform/audio/AudioDestination.h |
| +++ b/third_party/WebKit/Source/platform/audio/AudioDestination.h |
| @@ -45,6 +45,7 @@ namespace blink { |
| class AudioFIFO; |
| class AudioPullFIFO; |
| class SecurityOrigin; |
| +class WebAudioLatencyHint; |
| // An AudioDestination using Chromium's audio system |
| @@ -58,7 +59,7 @@ class PLATFORM_EXPORT AudioDestination : public WebAudioDevice::RenderCallback, |
| const String& inputDeviceId, |
| unsigned numberOfInputChannels, |
| unsigned numberOfOutputChannels, |
| - float sampleRate, |
| + const WebAudioLatencyHint&, |
| PassRefPtr<SecurityOrigin>); |
| ~AudioDestination() override; |
| @@ -70,15 +71,13 @@ class PLATFORM_EXPORT AudioDestination : public WebAudioDevice::RenderCallback, |
| const String& inputDeviceId, |
| unsigned numberOfInputChannels, |
| unsigned numberOfOutputChannels, |
| - float sampleRate, |
| + const WebAudioLatencyHint&, |
| PassRefPtr<SecurityOrigin>); |
| virtual void start(); |
| virtual void stop(); |
| bool isPlaying() { return m_isPlaying; } |
| - float sampleRate() const { return m_sampleRate; } |
| - |
| // WebAudioDevice::RenderCallback |
| void render(const WebVector<float*>& sourceData, |
| const WebVector<float*>& audioData, |
| @@ -102,7 +101,6 @@ class PLATFORM_EXPORT AudioDestination : public WebAudioDevice::RenderCallback, |
| unsigned m_numberOfOutputChannels; |
| RefPtr<AudioBus> m_inputBus; |
| RefPtr<AudioBus> m_renderBus; |
| - float m_sampleRate; |
|
hongchan
2016/11/15 23:46:01
How do I query the sample rate of the destination
Andrew MacPherson
2016/11/16 10:58:30
My understanding is that this should be queried us
|
| bool m_isPlaying; |
| std::unique_ptr<WebAudioDevice> m_audioDevice; |
| size_t m_callbackBufferSize; |