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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 void AudioNode::dispose() | 98 void AudioNode::dispose() |
99 { | 99 { |
100 ASSERT(isMainThread()); | 100 ASSERT(isMainThread()); |
101 ASSERT(context()->isGraphOwner()); | 101 ASSERT(context()->isGraphOwner()); |
102 | 102 |
103 context()->removeChangedChannelCountMode(this); | 103 context()->removeChangedChannelCountMode(this); |
104 context()->removeAutomaticPullNode(this); | 104 context()->removeAutomaticPullNode(this); |
105 context()->disposeOutputs(*this); | 105 context()->disposeOutputs(*this); |
106 for (unsigned i = 0; i < m_outputs.size(); ++i) | 106 for (unsigned i = 0; i < m_outputs.size(); ++i) |
107 output(i)->disconnectAll(); | 107 output(i)->disconnectAll(); |
108 | |
109 if (context()->contextState() != AudioContext::Running) | |
110 return; | |
111 ThreadState::current()->markAsZombie(this); | |
112 context()->setLastZombie(this); | |
113 } | 108 } |
114 | 109 |
115 String AudioNode::nodeTypeName() const | 110 String AudioNode::nodeTypeName() const |
116 { | 111 { |
117 switch (m_nodeType) { | 112 switch (m_nodeType) { |
118 case NodeTypeDestination: | 113 case NodeTypeDestination: |
119 return "AudioDestinationNode"; | 114 return "AudioDestinationNode"; |
120 case NodeTypeOscillator: | 115 case NodeTypeOscillator: |
121 return "OscillatorNode"; | 116 return "OscillatorNode"; |
122 case NodeTypeAudioBufferSource: | 117 case NodeTypeAudioBufferSource: |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 | 603 |
609 void AudioNode::updateChannelCountMode() | 604 void AudioNode::updateChannelCountMode() |
610 { | 605 { |
611 m_channelCountMode = m_newChannelCountMode; | 606 m_channelCountMode = m_newChannelCountMode; |
612 updateChannelsForInputs(); | 607 updateChannelsForInputs(); |
613 } | 608 } |
614 | 609 |
615 } // namespace blink | 610 } // namespace blink |
616 | 611 |
617 #endif // ENABLE(WEB_AUDIO) | 612 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |