Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Unified Diff: content/renderer/media/renderer_webaudiodevice_impl.h

Issue 2501863003: Support for AudioContextOptions latencyHint. (Closed)
Patch Set: More fixes based on reviewer comments. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/renderer_webaudiodevice_impl.h
diff --git a/content/renderer/media/renderer_webaudiodevice_impl.h b/content/renderer/media/renderer_webaudiodevice_impl.h
index a761e4294ee437024a979d1b6111b3e71b0b7cc6..a024345e1378aa830d21b4633bca7299ee7df2c2 100644
--- a/content/renderer/media/renderer_webaudiodevice_impl.h
+++ b/content/renderer/media/renderer_webaudiodevice_impl.h
@@ -13,6 +13,7 @@
#include "media/base/audio_parameters.h"
#include "media/base/audio_renderer_sink.h"
#include "third_party/WebKit/public/platform/WebAudioDevice.h"
+#include "third_party/WebKit/public/platform/WebAudioLatencyHint.h"
#include "third_party/WebKit/public/platform/WebVector.h"
#include "url/origin.h"
@@ -25,7 +26,8 @@ class RendererWebAudioDeviceImpl
: public blink::WebAudioDevice,
public media::AudioRendererSink::RenderCallback {
public:
- RendererWebAudioDeviceImpl(const media::AudioParameters& params,
+ RendererWebAudioDeviceImpl(media::ChannelLayout layout,
+ const blink::WebAudioLatencyHint& latency_hint,
blink::WebAudioDevice::RenderCallback* callback,
int session_id,
const url::Origin& security_origin);
@@ -35,6 +37,7 @@ class RendererWebAudioDeviceImpl
void start() override;
void stop() override;
double sampleRate() override;
+ int framesPerBuffer() override;
// AudioRendererSink::RenderCallback implementation.
int Render(media::AudioBus* dest,
@@ -44,7 +47,9 @@ class RendererWebAudioDeviceImpl
void OnRenderError() override;
private:
- const media::AudioParameters params_;
+ media::AudioParameters sink_params_;
+
+ const blink::WebAudioLatencyHint latency_hint_;
// Weak reference to the callback into WebKit code.
blink::WebAudioDevice::RenderCallback* const client_callback_;

Powered by Google App Engine
This is Rietveld 408576698