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

Unified Diff: Source/modules/webaudio/AudioContext.h

Issue 543073004: Defer changes to the channel count mode to the pre or post-render phase (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add ASSERT Created 6 years, 3 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
« no previous file with comments | « no previous file | Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioContext.h
diff --git a/Source/modules/webaudio/AudioContext.h b/Source/modules/webaudio/AudioContext.h
index feac957f31d1b8d0cd62f3ae97da6cc7d0857a32..7efdd5e33d729c7577f1f85b7bfdc69a9efd2b23 100644
--- a/Source/modules/webaudio/AudioContext.h
+++ b/Source/modules/webaudio/AudioContext.h
@@ -151,6 +151,12 @@ public:
// Called right before handlePostRenderTasks() to handle nodes which need to be pulled even when they are not connected to anything.
void processAutomaticPullNodes(size_t framesToProcess);
+ // Keep track of AudioNode's that have their channel count mode changed. We process the changes
+ // in the post rendering phase.
+ void addChangedChannelCountMode(AudioNode*);
+ void removeChangedChannelCountMode(AudioNode*);
+ void updateChangedChannelCountMode();
+
// Keeps track of the number of connections made.
void incrementConnectionCount()
{
@@ -342,6 +348,11 @@ private:
AsyncAudioDecoder m_audioDecoder;
+ // Collection of nodes where the channel count mode has changed. We want the channel count mode
+ // to change in the pre- or post-rendering phase so as not to disturb the running audio thread.
+ GC_PLUGIN_IGNORE("http://crbug.com/404527")
+ HashSet<AudioNode*> m_deferredCountModeChange;
+
// This is considering 32 is large enough for multiple channels audio.
// It is somewhat arbitrary and could be increased if necessary.
enum { MaxNumberOfChannels = 32 };
« no previous file with comments | « no previous file | Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698