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

Unified Diff: third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.h

Issue 2501863003: Support for AudioContextOptions latencyHint. (Closed)
Patch Set: Add baseLatency and fix use of hardwareSampleRate. Created 4 years, 1 month 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: third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.h
diff --git a/third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.h b/third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.h
index d96b3eb67a54cb7e6561bc8e47e2df6253a3717e..fae6aee68729d0b6a9df2cd702f5664a325f6e57 100644
--- a/third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.h
@@ -28,16 +28,20 @@
#include "modules/webaudio/AudioDestinationNode.h"
#include "platform/audio/AudioDestination.h"
+#include "public/platform/WebAudioLatencyHint.h"
#include <memory>
namespace blink {
class BaseAudioContext;
class ExceptionState;
+class WebAudioLatencyHint;
class DefaultAudioDestinationHandler final : public AudioDestinationHandler {
public:
- static PassRefPtr<DefaultAudioDestinationHandler> create(AudioNode&);
+ static PassRefPtr<DefaultAudioDestinationHandler> create(
+ AudioNode&,
+ const WebAudioLatencyHint&);
~DefaultAudioDestinationHandler() override;
// AudioHandler
@@ -50,22 +54,28 @@ class DefaultAudioDestinationHandler final : public AudioDestinationHandler {
void startRendering() override;
void stopRendering() override;
unsigned long maxChannelCount() const override;
+ double sampleRate() const override;
+ int framesPerBuffer() const override;
private:
- explicit DefaultAudioDestinationHandler(AudioNode&);
+ explicit DefaultAudioDestinationHandler(AudioNode&,
+ const WebAudioLatencyHint&);
void createDestination();
std::unique_ptr<AudioDestination> m_destination;
String m_inputDeviceId;
unsigned m_numberOfInputChannels;
+ const WebAudioLatencyHint m_latencyHint;
};
class DefaultAudioDestinationNode final : public AudioDestinationNode {
public:
- static DefaultAudioDestinationNode* create(BaseAudioContext*);
+ static DefaultAudioDestinationNode* create(BaseAudioContext*,
+ const WebAudioLatencyHint&);
private:
- explicit DefaultAudioDestinationNode(BaseAudioContext&);
+ explicit DefaultAudioDestinationNode(BaseAudioContext&,
+ const WebAudioLatencyHint&);
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698