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

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

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/ConvolverNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp b/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp
index 36287ff52d8591ab93103fd18954a6e19c84f659..11d5715fdc831b45ca427e2011b85a8feac8e4d3 100644
--- a/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp
@@ -158,7 +158,7 @@ double ConvolverHandler::tailTime() const {
if (tryLocker.locked())
return m_reverb
? m_reverb->impulseResponseLength() /
- static_cast<double>(sampleRate())
+ static_cast<double>(context()->sampleRate())
: 0;
// Since we don't want to block the Audio Device thread, we return a large
// value instead of trying to acquire the lock.
@@ -169,7 +169,8 @@ double ConvolverHandler::latencyTime() const {
MutexTryLocker tryLocker(m_processLock);
if (tryLocker.locked())
return m_reverb
- ? m_reverb->latencyFrames() / static_cast<double>(sampleRate())
+ ? m_reverb->latencyFrames() /
+ static_cast<double>(context()->sampleRate())
: 0;
// Since we don't want to block the Audio Device thread, we return a large
// value instead of trying to acquire the lock.

Powered by Google App Engine
This is Rietveld 408576698