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

Side by Side Diff: Source/modules/webaudio/AudioNode.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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 String channelInterpretation(); 176 String channelInterpretation();
177 void setChannelInterpretation(const String&, ExceptionState&); 177 void setChannelInterpretation(const String&, ExceptionState&);
178 178
179 ChannelCountMode internalChannelCountMode() const { return m_channelCountMod e; } 179 ChannelCountMode internalChannelCountMode() const { return m_channelCountMod e; }
180 AudioBus::ChannelInterpretation internalChannelInterpretation() const { retu rn m_channelInterpretation; } 180 AudioBus::ChannelInterpretation internalChannelInterpretation() const { retu rn m_channelInterpretation; }
181 181
182 // EventTarget 182 // EventTarget
183 virtual const AtomicString& interfaceName() const OVERRIDE FINAL; 183 virtual const AtomicString& interfaceName() const OVERRIDE FINAL;
184 virtual ExecutionContext* executionContext() const OVERRIDE FINAL; 184 virtual ExecutionContext* executionContext() const OVERRIDE FINAL;
185 185
186 void updateChannelCountMode();
187
186 virtual void trace(Visitor*) OVERRIDE; 188 virtual void trace(Visitor*) OVERRIDE;
187 189
188 protected: 190 protected:
189 // Inputs and outputs must be created before the AudioNode is initialized. 191 // Inputs and outputs must be created before the AudioNode is initialized.
190 void addInput(); 192 void addInput();
191 void addOutput(AudioNodeOutput*); 193 void addOutput(AudioNodeOutput*);
192 194
193 // Called by processIfNecessary() to cause all parts of the rendering graph connected to us to process. 195 // Called by processIfNecessary() to cause all parts of the rendering graph connected to us to process.
194 // Each rendering quantum, the audio data for each of the AudioNode's inputs will be available after this method is called. 196 // Each rendering quantum, the audio data for each of the AudioNode's inputs will be available after this method is called.
195 // Called from context's audio thread. 197 // Called from context's audio thread.
(...skipping 16 matching lines...) Expand all
212 volatile int m_connectionRefCount; 214 volatile int m_connectionRefCount;
213 215
214 bool m_isDisabled; 216 bool m_isDisabled;
215 217
216 #if DEBUG_AUDIONODE_REFERENCES 218 #if DEBUG_AUDIONODE_REFERENCES
217 static bool s_isNodeCountInitialized; 219 static bool s_isNodeCountInitialized;
218 static int s_nodeCount[NodeTypeEnd]; 220 static int s_nodeCount[NodeTypeEnd];
219 #endif 221 #endif
220 static unsigned s_instanceCount; 222 static unsigned s_instanceCount;
221 223
224 // The new channel count mode that will be used to set the actual mode in th e pre or post
225 // rendering phase.
226 ChannelCountMode m_newChannelCountMode;
222 protected: 227 protected:
223 unsigned m_channelCount; 228 unsigned m_channelCount;
224 ChannelCountMode m_channelCountMode; 229 ChannelCountMode m_channelCountMode;
225 AudioBus::ChannelInterpretation m_channelInterpretation; 230 AudioBus::ChannelInterpretation m_channelInterpretation;
226 }; 231 };
227 232
228 } // namespace blink 233 } // namespace blink
229 234
230 #endif // AudioNode_h 235 #endif // AudioNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698