| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 ++s_nodeCount[type]; | 166 ++s_nodeCount[type]; |
| 167 fprintf(stderr, "%p: %2d: AudioNode::AudioNode [%3d]\n", this, nodeType(), s
_nodeCount[nodeType()]); | 167 fprintf(stderr, "%p: %2d: AudioNode::AudioNode [%3d]\n", this, nodeType(), s
_nodeCount[nodeType()]); |
| 168 #endif | 168 #endif |
| 169 } | 169 } |
| 170 | 170 |
| 171 void AudioNode::addInput() | 171 void AudioNode::addInput() |
| 172 { | 172 { |
| 173 m_inputs.append(AudioNodeInput::create(*this)); | 173 m_inputs.append(AudioNodeInput::create(*this)); |
| 174 } | 174 } |
| 175 | 175 |
| 176 void AudioNode::addOutput(AudioNodeOutput* output) | 176 void AudioNode::addOutput(unsigned numberOfChannels) |
| 177 { | 177 { |
| 178 m_outputs.append(output); | 178 m_outputs.append(AudioNodeOutput::create(this, numberOfChannels)); |
| 179 } | 179 } |
| 180 | 180 |
| 181 AudioNodeInput* AudioNode::input(unsigned i) | 181 AudioNodeInput* AudioNode::input(unsigned i) |
| 182 { | 182 { |
| 183 if (i < m_inputs.size()) | 183 if (i < m_inputs.size()) |
| 184 return m_inputs[i].get(); | 184 return m_inputs[i].get(); |
| 185 return nullptr; | 185 return nullptr; |
| 186 } | 186 } |
| 187 | 187 |
| 188 AudioNodeOutput* AudioNode::output(unsigned i) | 188 AudioNodeOutput* AudioNode::output(unsigned i) |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 | 805 |
| 806 void AudioNode::updateChannelCountMode() | 806 void AudioNode::updateChannelCountMode() |
| 807 { | 807 { |
| 808 m_channelCountMode = m_newChannelCountMode; | 808 m_channelCountMode = m_newChannelCountMode; |
| 809 updateChannelsForInputs(); | 809 updateChannelsForInputs(); |
| 810 } | 810 } |
| 811 | 811 |
| 812 } // namespace blink | 812 } // namespace blink |
| 813 | 813 |
| 814 #endif // ENABLE(WEB_AUDIO) | 814 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |