| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 , m_numberOfOutputChannels(numberOfOutputChannels) | 96 , m_numberOfOutputChannels(numberOfOutputChannels) |
| 97 , m_internalInputBus(AudioBus::create(numberOfInputChannels, AudioNode::Proc
essingSizeInFrames, false)) | 97 , m_internalInputBus(AudioBus::create(numberOfInputChannels, AudioNode::Proc
essingSizeInFrames, false)) |
| 98 { | 98 { |
| 99 // Regardless of the allowed buffer sizes, we still need to process at the g
ranularity of the AudioNode. | 99 // Regardless of the allowed buffer sizes, we still need to process at the g
ranularity of the AudioNode. |
| 100 if (m_bufferSize < AudioNode::ProcessingSizeInFrames) | 100 if (m_bufferSize < AudioNode::ProcessingSizeInFrames) |
| 101 m_bufferSize = AudioNode::ProcessingSizeInFrames; | 101 m_bufferSize = AudioNode::ProcessingSizeInFrames; |
| 102 | 102 |
| 103 ASSERT(numberOfInputChannels <= AudioContext::maxNumberOfChannels()); | 103 ASSERT(numberOfInputChannels <= AudioContext::maxNumberOfChannels()); |
| 104 | 104 |
| 105 addInput(); | 105 addInput(); |
| 106 addOutput(AudioNodeOutput::create(this, numberOfOutputChannels)); | 106 addOutput(numberOfOutputChannels); |
| 107 | 107 |
| 108 m_channelCount = numberOfInputChannels; | 108 m_channelCount = numberOfInputChannels; |
| 109 m_channelCountMode = Explicit; | 109 m_channelCountMode = Explicit; |
| 110 | 110 |
| 111 initialize(); | 111 initialize(); |
| 112 } | 112 } |
| 113 | 113 |
| 114 ScriptProcessorNode::~ScriptProcessorNode() | 114 ScriptProcessorNode::~ScriptProcessorNode() |
| 115 { | 115 { |
| 116 ASSERT(!isInitialized()); | 116 ASSERT(!isInitialized()); |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 DEFINE_TRACE(ScriptProcessorNode) | 300 DEFINE_TRACE(ScriptProcessorNode) |
| 301 { | 301 { |
| 302 visitor->trace(m_inputBuffers); | 302 visitor->trace(m_inputBuffers); |
| 303 visitor->trace(m_outputBuffers); | 303 visitor->trace(m_outputBuffers); |
| 304 AudioNode::trace(visitor); | 304 AudioNode::trace(visitor); |
| 305 } | 305 } |
| 306 | 306 |
| 307 } // namespace blink | 307 } // namespace blink |
| 308 | 308 |
| 309 #endif // ENABLE(WEB_AUDIO) | 309 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |