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

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

Issue 1820403002: Implement Automations for PannerNode and AutioListener (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update test because CL for min/maxValue AudioParam landed Created 4 years, 7 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/AbstractAudioContext.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp b/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp
index 35fca91ff6d7888f769921a1209d53e3c4b46d77..fcfa28d9c3f55cbcff6d24dc9f2ce5767d40f202 100644
--- a/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp
@@ -135,10 +135,12 @@ void AbstractAudioContext::initialize()
return;
FFTFrame::initialize();
- m_listener = AudioListener::create();
if (m_destinationNode) {
m_destinationNode->handler().initialize();
+ // The AudioParams in the listener need access to the destination node, so only create the
+ // listener if the destination node exists.
+ m_listener = AudioListener::create(*this);
}
}
@@ -855,6 +857,9 @@ void AbstractAudioContext::handlePreRenderTasks()
// Check to see if source nodes can be stopped because the end time has passed.
handleStoppableSourceNodes();
+ // Update the dirty state of the listener.
+ listener()->updateState();
+
unlock();
}
}

Powered by Google App Engine
This is Rietveld 408576698