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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioContext.cpp

Issue 2750543003: Support AudioContextOptions latencyHint as double. (Closed)
Patch Set: Created 3 years, 9 months 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/AudioContext.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp b/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp
index 4813a821ca2a026289282b9bd70bfca354b2ad3d..4b36b512a1a3ce0f23a33ff3e94ced61b2237209 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp
@@ -53,8 +53,10 @@ AudioContext* AudioContext::create(Document& document,
if (contextOptions.latencyHint().isAudioContextLatencyCategory()) {
latencyHint = WebAudioLatencyHint(
contextOptions.latencyHint().getAsAudioContextLatencyCategory());
+ } else if (contextOptions.latencyHint().isDouble()) {
+ latencyHint =
+ WebAudioLatencyHint(contextOptions.latencyHint().getAsDouble());
}
- // TODO: add support for latencyHint().isDouble()
AudioContext* audioContext = new AudioContext(document, latencyHint);
audioContext->suspendIfNeeded();

Powered by Google App Engine
This is Rietveld 408576698