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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 : m_isInitialized(false) | 49 : m_isInitialized(false) |
50 , m_nodeType(NodeTypeUnknown) | 50 , m_nodeType(NodeTypeUnknown) |
51 , m_context(context) | 51 , m_context(context) |
52 , m_sampleRate(sampleRate) | 52 , m_sampleRate(sampleRate) |
53 , m_lastProcessingTime(-1) | 53 , m_lastProcessingTime(-1) |
54 , m_lastNonSilentTime(-1) | 54 , m_lastNonSilentTime(-1) |
55 #if !ENABLE(OILPAN) | 55 #if !ENABLE(OILPAN) |
56 , m_normalRefCount(1) // start out with normal refCount == 1 (like WTF::RefC
ounted class) | 56 , m_normalRefCount(1) // start out with normal refCount == 1 (like WTF::RefC
ounted class) |
57 #endif | 57 #endif |
58 , m_connectionRefCount(0) | 58 , m_connectionRefCount(0) |
| 59 #if !ENABLE(OILPAN) |
59 , m_isMarkedForDeletion(false) | 60 , m_isMarkedForDeletion(false) |
| 61 #endif |
60 , m_isDisabled(false) | 62 , m_isDisabled(false) |
61 , m_channelCount(2) | 63 , m_channelCount(2) |
62 , m_channelCountMode(Max) | 64 , m_channelCountMode(Max) |
63 , m_channelInterpretation(AudioBus::Speakers) | 65 , m_channelInterpretation(AudioBus::Speakers) |
64 { | 66 { |
65 ScriptWrappable::init(this); | 67 ScriptWrappable::init(this); |
66 #if ENABLE(OILPAN) | 68 #if ENABLE(OILPAN) |
67 m_context->registerLiveNode(*this); | 69 m_context->registerLiveNode(*this); |
68 #endif | 70 #endif |
69 #if DEBUG_AUDIONODE_REFERENCES | 71 #if DEBUG_AUDIONODE_REFERENCES |
(...skipping 29 matching lines...) Expand all Loading... |
99 } | 101 } |
100 | 102 |
101 void AudioNode::dispose() | 103 void AudioNode::dispose() |
102 { | 104 { |
103 ASSERT(isMainThread()); | 105 ASSERT(isMainThread()); |
104 ASSERT(context()->isGraphOwner()); | 106 ASSERT(context()->isGraphOwner()); |
105 #if ENABLE(OILPAN) | 107 #if ENABLE(OILPAN) |
106 context()->removeAutomaticPullNode(this); | 108 context()->removeAutomaticPullNode(this); |
107 for (unsigned i = 0; i < m_outputs.size(); ++i) | 109 for (unsigned i = 0; i < m_outputs.size(); ++i) |
108 output(i)->disconnectAll(); | 110 output(i)->disconnectAll(); |
109 m_isMarkedForDeletion = true; | |
110 #endif | 111 #endif |
111 context()->unmarkDirtyNode(*this); | 112 context()->unmarkDirtyNode(*this); |
112 } | 113 } |
113 | 114 |
114 String AudioNode::nodeTypeName() const | 115 String AudioNode::nodeTypeName() const |
115 { | 116 { |
116 switch (m_nodeType) { | 117 switch (m_nodeType) { |
117 case NodeTypeDestination: | 118 case NodeTypeDestination: |
118 return "AudioDestinationNode"; | 119 return "AudioDestinationNode"; |
119 case NodeTypeOscillator: | 120 case NodeTypeOscillator: |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 { | 640 { |
640 visitor->trace(m_context); | 641 visitor->trace(m_context); |
641 visitor->trace(m_inputs); | 642 visitor->trace(m_inputs); |
642 visitor->trace(m_outputs); | 643 visitor->trace(m_outputs); |
643 EventTargetWithInlineData::trace(visitor); | 644 EventTargetWithInlineData::trace(visitor); |
644 } | 645 } |
645 | 646 |
646 } // namespace blink | 647 } // namespace blink |
647 | 648 |
648 #endif // ENABLE(WEB_AUDIO) | 649 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |