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

Side by Side Diff: Source/modules/webaudio/AudioContext.h

Issue 349213007: WebAudio: Remove AudioNode::RefType. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix webaudio/delaynode-max-nondefault-delay.html Created 6 years, 5 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // When the context goes away, there might still be some sources which haven 't finished playing. 260 // When the context goes away, there might still be some sources which haven 't finished playing.
261 // Make sure to dereference them here. 261 // Make sure to dereference them here.
262 void derefUnfinishedSourceNodes(); 262 void derefUnfinishedSourceNodes();
263 263
264 RefPtrWillBeMember<AudioDestinationNode> m_destinationNode; 264 RefPtrWillBeMember<AudioDestinationNode> m_destinationNode;
265 RefPtrWillBeMember<AudioListener> m_listener; 265 RefPtrWillBeMember<AudioListener> m_listener;
266 266
267 // Only accessed in the audio thread. 267 // Only accessed in the audio thread.
268 Vector<AudioNode*> m_finishedNodes; 268 Vector<AudioNode*> m_finishedNodes;
269 269
270 // We don't use RefPtr<AudioNode> here because AudioNode has a more complex ref() / deref() implementation 270 // List of source nodes. This is either accessed when the graph lock is
271 // with an optional argument for refType. We need to use the special refTyp e: RefTypeConnection 271 // held, or on the main thread when the audio thread has finished.
272 // Either accessed when the graph lock is held, or on the main thread when t he audio thread has finished. 272 // This RefPtr is connection reference. We must call AudioNode::
273 Vector<AudioNode*> m_referencedNodes; 273 // makeConnection() after ref(), and call AudioNode::breakConnection()
274 // before deref().
275 Vector<RefPtr<AudioNode> > m_referencedNodes;
274 276
275 // Accumulate nodes which need to be deleted here. 277 // Accumulate nodes which need to be deleted here.
276 // This is copied to m_nodesToDelete at the end of a render cycle in handleP ostRenderTasks(), where we're assured of a stable graph 278 // This is copied to m_nodesToDelete at the end of a render cycle in handleP ostRenderTasks(), where we're assured of a stable graph
277 // state which will have no references to any of the nodes in m_nodesToDelet e once the context lock is released 279 // state which will have no references to any of the nodes in m_nodesToDelet e once the context lock is released
278 // (when handlePostRenderTasks() has completed). 280 // (when handlePostRenderTasks() has completed).
279 Vector<AudioNode*> m_nodesMarkedForDeletion; 281 Vector<AudioNode*> m_nodesMarkedForDeletion;
280 282
281 // They will be scheduled for deletion (on the main thread) at the end of a render cycle (in realtime thread). 283 // They will be scheduled for deletion (on the main thread) at the end of a render cycle (in realtime thread).
282 Vector<AudioNode*> m_nodesToDelete; 284 Vector<AudioNode*> m_nodesToDelete;
283 bool m_isDeletionScheduled; 285 bool m_isDeletionScheduled;
(...skipping 29 matching lines...) Expand all
313 AsyncAudioDecoder m_audioDecoder; 315 AsyncAudioDecoder m_audioDecoder;
314 316
315 // This is considering 32 is large enough for multiple channels audio. 317 // This is considering 32 is large enough for multiple channels audio.
316 // It is somewhat arbitrary and could be increased if necessary. 318 // It is somewhat arbitrary and could be increased if necessary.
317 enum { MaxNumberOfChannels = 32 }; 319 enum { MaxNumberOfChannels = 32 };
318 }; 320 };
319 321
320 } // WebCore 322 } // WebCore
321 323
322 #endif // AudioContext_h 324 #endif // AudioContext_h
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioBufferSourceNode.cpp ('k') | Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698