| 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 30 matching lines...) Expand all Loading... |
| 41 , m_isInPlace(false) | 41 , m_isInPlace(false) |
| 42 , m_isEnabled(true) | 42 , m_isEnabled(true) |
| 43 , m_renderingFanOutCount(0) | 43 , m_renderingFanOutCount(0) |
| 44 , m_renderingParamFanOutCount(0) | 44 , m_renderingParamFanOutCount(0) |
| 45 { | 45 { |
| 46 ASSERT(numberOfChannels <= AudioContext::maxNumberOfChannels()); | 46 ASSERT(numberOfChannels <= AudioContext::maxNumberOfChannels()); |
| 47 | 47 |
| 48 m_internalBus = AudioBus::create(numberOfChannels, AudioNode::ProcessingSize
InFrames); | 48 m_internalBus = AudioBus::create(numberOfChannels, AudioNode::ProcessingSize
InFrames); |
| 49 } | 49 } |
| 50 | 50 |
| 51 PassOwnPtrWillBeRawPtr<AudioNodeOutput> AudioNodeOutput::create(AudioNode* node,
unsigned numberOfChannels) | 51 AudioNodeOutput* AudioNodeOutput::create(AudioNode* node, unsigned numberOfChann
els) |
| 52 { | 52 { |
| 53 return adoptPtrWillBeNoop(new AudioNodeOutput(node, numberOfChannels)); | 53 return new AudioNodeOutput(node, numberOfChannels); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void AudioNodeOutput::trace(Visitor* visitor) | 56 void AudioNodeOutput::trace(Visitor* visitor) |
| 57 { | 57 { |
| 58 #if ENABLE(OILPAN) | |
| 59 visitor->trace(m_node); | 58 visitor->trace(m_node); |
| 60 visitor->trace(m_inputs); | 59 visitor->trace(m_inputs); |
| 61 visitor->trace(m_params); | 60 visitor->trace(m_params); |
| 62 #endif | |
| 63 } | 61 } |
| 64 | 62 |
| 65 void AudioNodeOutput::setNumberOfChannels(unsigned numberOfChannels) | 63 void AudioNodeOutput::setNumberOfChannels(unsigned numberOfChannels) |
| 66 { | 64 { |
| 67 ASSERT(numberOfChannels <= AudioContext::maxNumberOfChannels()); | 65 ASSERT(numberOfChannels <= AudioContext::maxNumberOfChannels()); |
| 68 ASSERT(context()->isGraphOwner()); | 66 ASSERT(context()->isGraphOwner()); |
| 69 | 67 |
| 70 m_desiredNumberOfChannels = numberOfChannels; | 68 m_desiredNumberOfChannels = numberOfChannels; |
| 71 | 69 |
| 72 if (context()->isAudioThread()) { | 70 if (context()->isAudioThread()) { |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 if (!m_isEnabled) { | 223 if (!m_isEnabled) { |
| 226 for (InputsIterator i = m_inputs.begin(); i != m_inputs.end(); ++i) | 224 for (InputsIterator i = m_inputs.begin(); i != m_inputs.end(); ++i) |
| 227 i->key->enable(*this); | 225 i->key->enable(*this); |
| 228 m_isEnabled = true; | 226 m_isEnabled = true; |
| 229 } | 227 } |
| 230 } | 228 } |
| 231 | 229 |
| 232 } // namespace blink | 230 } // namespace blink |
| 233 | 231 |
| 234 #endif // ENABLE(WEB_AUDIO) | 232 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |