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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioNode.h

Issue 2440583002: Use AudioUtilities::kRenderQuantumFrames everywhere (Closed)
Patch Set: Address review comments Created 4 years, 1 month 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
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 11 matching lines...) Expand all
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
23 * DAMAGE. 23 * DAMAGE.
24 */ 24 */
25 25
26 #ifndef AudioNode_h 26 #ifndef AudioNode_h
27 #define AudioNode_h 27 #define AudioNode_h
28 28
29 #include "modules/EventTargetModules.h" 29 #include "modules/EventTargetModules.h"
30 #include "modules/ModulesExport.h" 30 #include "modules/ModulesExport.h"
31 #include "platform/audio/AudioBus.h" 31 #include "platform/audio/AudioBus.h"
32 #include "platform/audio/AudioUtilities.h"
32 #include "wtf/Forward.h" 33 #include "wtf/Forward.h"
33 #include "wtf/RefPtr.h" 34 #include "wtf/RefPtr.h"
34 #include "wtf/ThreadSafeRefCounted.h" 35 #include "wtf/ThreadSafeRefCounted.h"
35 #include "wtf/Vector.h" 36 #include "wtf/Vector.h"
36 #include "wtf/build_config.h" 37 #include "wtf/build_config.h"
37 #include <memory> 38 #include <memory>
38 39
39 #define DEBUG_AUDIONODE_REFERENCES 0 40 #define DEBUG_AUDIONODE_REFERENCES 0
40 41
41 namespace blink { 42 namespace blink {
(...skipping 23 matching lines...) Expand all
65 // AudioHandler is created and owned by an AudioNode almost all the time. When 66 // AudioHandler is created and owned by an AudioNode almost all the time. When
66 // the AudioNode is about to die, the ownership of its AudioHandler is 67 // the AudioNode is about to die, the ownership of its AudioHandler is
67 // transferred to DeferredTaskHandler, and it does deref the AudioHandler on the 68 // transferred to DeferredTaskHandler, and it does deref the AudioHandler on the
68 // main thread. 69 // main thread.
69 // 70 //
70 // Be careful to avoid reference cycles. If an AudioHandler has a reference 71 // Be careful to avoid reference cycles. If an AudioHandler has a reference
71 // cycle including the owner AudioNode, objects in the cycle are never 72 // cycle including the owner AudioNode, objects in the cycle are never
72 // collected. 73 // collected.
73 class MODULES_EXPORT AudioHandler : public ThreadSafeRefCounted<AudioHandler> { 74 class MODULES_EXPORT AudioHandler : public ThreadSafeRefCounted<AudioHandler> {
74 public: 75 public:
75 enum { ProcessingSizeInFrames = 128 };
76
77 enum NodeType { 76 enum NodeType {
78 NodeTypeUnknown = 0, 77 NodeTypeUnknown = 0,
79 NodeTypeDestination = 1, 78 NodeTypeDestination = 1,
80 NodeTypeOscillator = 2, 79 NodeTypeOscillator = 2,
81 NodeTypeAudioBufferSource = 3, 80 NodeTypeAudioBufferSource = 3,
82 NodeTypeMediaElementAudioSource = 4, 81 NodeTypeMediaElementAudioSource = 4,
83 NodeTypeMediaStreamAudioDestination = 5, 82 NodeTypeMediaStreamAudioDestination = 5,
84 NodeTypeMediaStreamAudioSource = 6, 83 NodeTypeMediaStreamAudioSource = 6,
85 NodeTypeJavaScript = 7, 84 NodeTypeJavaScript = 7,
86 NodeTypeBiquadFilter = 8, 85 NodeTypeBiquadFilter = 8,
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 HeapVector<Member<HeapHashSet<Member<AudioNode>>>> m_connectedNodes; 365 HeapVector<Member<HeapHashSet<Member<AudioNode>>>> m_connectedNodes;
367 // Represents audio node graph with Oilpan references. N-th HeapHashSet 366 // Represents audio node graph with Oilpan references. N-th HeapHashSet
368 // represents a set of AudioParam objects connected to this AudioNode's N-th 367 // represents a set of AudioParam objects connected to this AudioNode's N-th
369 // output. 368 // output.
370 HeapVector<Member<HeapHashSet<Member<AudioParam>>>> m_connectedParams; 369 HeapVector<Member<HeapHashSet<Member<AudioParam>>>> m_connectedParams;
371 }; 370 };
372 371
373 } // namespace blink 372 } // namespace blink
374 373
375 #endif // AudioNode_h 374 #endif // AudioNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698