OLD | NEW |
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 Loading... |
22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 */ | 23 */ |
24 | 24 |
25 #ifndef AudioNode_h | 25 #ifndef AudioNode_h |
26 #define AudioNode_h | 26 #define AudioNode_h |
27 | 27 |
28 #include "modules/EventTargetModules.h" | 28 #include "modules/EventTargetModules.h" |
29 #include "modules/ModulesExport.h" | 29 #include "modules/ModulesExport.h" |
30 #include "platform/audio/AudioBus.h" | 30 #include "platform/audio/AudioBus.h" |
31 #include "wtf/Forward.h" | 31 #include "wtf/Forward.h" |
32 #include "wtf/OwnPtr.h" | |
33 #include "wtf/PassOwnPtr.h" | |
34 #include "wtf/RefPtr.h" | 32 #include "wtf/RefPtr.h" |
35 #include "wtf/ThreadSafeRefCounted.h" | 33 #include "wtf/ThreadSafeRefCounted.h" |
36 #include "wtf/Vector.h" | 34 #include "wtf/Vector.h" |
37 #include "wtf/build_config.h" | 35 #include "wtf/build_config.h" |
| 36 #include <memory> |
38 | 37 |
39 #define DEBUG_AUDIONODE_REFERENCES 0 | 38 #define DEBUG_AUDIONODE_REFERENCES 0 |
40 | 39 |
41 namespace blink { | 40 namespace blink { |
42 | 41 |
43 class AbstractAudioContext; | 42 class AbstractAudioContext; |
44 class AudioNode; | 43 class AudioNode; |
45 class AudioNodeInput; | 44 class AudioNodeInput; |
46 class AudioNodeOutput; | 45 class AudioNodeOutput; |
47 class AudioParam; | 46 class AudioParam; |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 // See http://crbug.com/404527 for the detail. | 244 // See http://crbug.com/404527 for the detail. |
246 UntracedMember<AudioNode> m_node; | 245 UntracedMember<AudioNode> m_node; |
247 | 246 |
248 // This untraced member is safe because this is cleared for all of live | 247 // This untraced member is safe because this is cleared for all of live |
249 // AudioHandlers when the AbstractAudioContext dies. Do not access m_contex
t | 248 // AudioHandlers when the AbstractAudioContext dies. Do not access m_contex
t |
250 // directly, use context() instead. | 249 // directly, use context() instead. |
251 // See http://crbug.com/404527 for the detail. | 250 // See http://crbug.com/404527 for the detail. |
252 UntracedMember<AbstractAudioContext> m_context; | 251 UntracedMember<AbstractAudioContext> m_context; |
253 | 252 |
254 float m_sampleRate; | 253 float m_sampleRate; |
255 Vector<OwnPtr<AudioNodeInput>> m_inputs; | 254 Vector<std::unique_ptr<AudioNodeInput>> m_inputs; |
256 Vector<OwnPtr<AudioNodeOutput>> m_outputs; | 255 Vector<std::unique_ptr<AudioNodeOutput>> m_outputs; |
257 | 256 |
258 double m_lastProcessingTime; | 257 double m_lastProcessingTime; |
259 double m_lastNonSilentTime; | 258 double m_lastNonSilentTime; |
260 | 259 |
261 volatile int m_connectionRefCount; | 260 volatile int m_connectionRefCount; |
262 | 261 |
263 bool m_isDisabled; | 262 bool m_isDisabled; |
264 | 263 |
265 #if DEBUG_AUDIONODE_REFERENCES | 264 #if DEBUG_AUDIONODE_REFERENCES |
266 static bool s_isNodeCountInitialized; | 265 static bool s_isNodeCountInitialized; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 HeapVector<Member<HeapHashSet<Member<AudioNode>>>> m_connectedNodes; | 336 HeapVector<Member<HeapHashSet<Member<AudioNode>>>> m_connectedNodes; |
338 // Represents audio node graph with Oilpan references. N-th HeapHashSet | 337 // Represents audio node graph with Oilpan references. N-th HeapHashSet |
339 // represents a set of AudioParam objects connected to this AudioNode's N-th | 338 // represents a set of AudioParam objects connected to this AudioNode's N-th |
340 // output. | 339 // output. |
341 HeapVector<Member<HeapHashSet<Member<AudioParam>>>> m_connectedParams; | 340 HeapVector<Member<HeapHashSet<Member<AudioParam>>>> m_connectedParams; |
342 }; | 341 }; |
343 | 342 |
344 } // namespace blink | 343 } // namespace blink |
345 | 344 |
346 #endif // AudioNode_h | 345 #endif // AudioNode_h |
OLD | NEW |