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

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

Issue 2501863003: Support for AudioContextOptions latencyHint. (Closed)
Patch Set: Updates 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,
o1ka 2016/12/02 12:02:12 Would be great if we add unit tests for RendererWe
Andrew MacPherson 2016/12/05 14:12:52 Sounds good! I will look into adding this in the n
Andrew MacPherson 2016/12/06 15:56:19 olka@: I took a look into how the unit tests work
o1ka 2016/12/06 16:08:26 Right. For AudioDeviceFactory and AudioRendererSin
Andrew MacPherson 2016/12/07 10:55:24 Done, I've added a unit test to the WebAudioDevice
+ 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