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

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: Address comments Created 4 years, 8 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 9bff5cd77cca1b36ab37427efbce45957e43f231..8b507eb0c6b945d67a593931c78729866ecaf087 100644
--- a/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp
@@ -138,10 +138,12 @@ void AbstractAudioContext::initialize()
return;
FFTFrame::initialize();
- m_listener = AudioListener::create();
if (m_destinationNode.get()) {
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);
}
}
@@ -833,6 +835,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