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

Unified Diff: third_party/WebKit/Source/platform/audio/AudioDestination.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/platform/audio/AudioDestination.cpp
diff --git a/third_party/WebKit/Source/platform/audio/AudioDestination.cpp b/third_party/WebKit/Source/platform/audio/AudioDestination.cpp
index 691ffb179e83c9f520c1d35e7ec0999ce6aac965..ff692918aa84800f9e5bb8ab952f7a81b3382a8c 100644
--- a/third_party/WebKit/Source/platform/audio/AudioDestination.cpp
+++ b/third_party/WebKit/Source/platform/audio/AudioDestination.cpp
@@ -73,11 +73,6 @@ AudioDestination::AudioDestination(AudioIOCallback& callback,
m_fifo(
WTF::wrapUnique(new PushPullFIFO(numberOfOutputChannels, kFIFOSize))),
m_framesElapsed(0) {
- m_callbackBufferSize = hardwareBufferSize();
- if (!checkBufferSize()) {
- NOTREACHED();
- }
-
// Create WebAudioDevice. blink::WebAudioDevice is designed to support the
// local input (e.g. loopback from OS audio system), but Chromium's media
// renderer does not support it currently. Thus, we use zero for the number
@@ -86,6 +81,11 @@ AudioDestination::AudioDestination(AudioIOCallback& callback,
0, numberOfOutputChannels, latencyHint, this, String(),
std::move(securityOrigin)));
DCHECK(m_webAudioDevice);
+
+ m_callbackBufferSize = m_webAudioDevice->framesPerBuffer();
Andrew MacPherson 2017/03/14 12:03:03 This CL changed m_callbackBufferSize to hardwareBu
hongchan 2017/03/14 14:36:34 If you rebase the patch, you'll see this is fixed.
Andrew MacPherson 2017/03/15 15:08:18 Great, just rebased now and can see this, thanks!
+ if (!checkBufferSize()) {
+ NOTREACHED();
+ }
}
AudioDestination::~AudioDestination() {

Powered by Google App Engine
This is Rietveld 408576698