| 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); |
| 108 } | 113 } |
| 109 | 114 |
| 110 String AudioNode::nodeTypeName() const | 115 String AudioNode::nodeTypeName() const |
| 111 { | 116 { |
| 112 switch (m_nodeType) { | 117 switch (m_nodeType) { |
| 113 case NodeTypeDestination: | 118 case NodeTypeDestination: |
| 114 return "AudioDestinationNode"; | 119 return "AudioDestinationNode"; |
| 115 case NodeTypeOscillator: | 120 case NodeTypeOscillator: |
| 116 return "OscillatorNode"; | 121 return "OscillatorNode"; |
| 117 case NodeTypeAudioBufferSource: | 122 case NodeTypeAudioBufferSource: |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 | 608 |
| 604 void AudioNode::updateChannelCountMode() | 609 void AudioNode::updateChannelCountMode() |
| 605 { | 610 { |
| 606 m_channelCountMode = m_newChannelCountMode; | 611 m_channelCountMode = m_newChannelCountMode; |
| 607 updateChannelsForInputs(); | 612 updateChannelsForInputs(); |
| 608 } | 613 } |
| 609 | 614 |
| 610 } // namespace blink | 615 } // namespace blink |
| 611 | 616 |
| 612 #endif // ENABLE(WEB_AUDIO) | 617 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |