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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 176 |
177 void AudioNode::addOutput(AudioNodeOutput* output) | 177 void AudioNode::addOutput(AudioNodeOutput* output) |
178 { | 178 { |
179 m_outputs.append(output); | 179 m_outputs.append(output); |
180 } | 180 } |
181 | 181 |
182 AudioNodeInput* AudioNode::input(unsigned i) | 182 AudioNodeInput* AudioNode::input(unsigned i) |
183 { | 183 { |
184 if (i < m_inputs.size()) | 184 if (i < m_inputs.size()) |
185 return m_inputs[i].get(); | 185 return m_inputs[i].get(); |
186 return 0; | 186 return nullptr; |
187 } | 187 } |
188 | 188 |
189 AudioNodeOutput* AudioNode::output(unsigned i) | 189 AudioNodeOutput* AudioNode::output(unsigned i) |
190 { | 190 { |
191 if (i < m_outputs.size()) | 191 if (i < m_outputs.size()) |
192 return m_outputs[i].get(); | 192 return m_outputs[i].get(); |
193 return 0; | 193 return nullptr; |
194 } | 194 } |
195 | 195 |
196 void AudioNode::connect(AudioNode* destination, unsigned outputIndex, unsigned i
nputIndex, ExceptionState& exceptionState) | 196 void AudioNode::connect(AudioNode* destination, unsigned outputIndex, unsigned i
nputIndex, ExceptionState& exceptionState) |
197 { | 197 { |
198 ASSERT(isMainThread()); | 198 ASSERT(isMainThread()); |
199 AudioContext::AutoLocker locker(context()); | 199 AudioContext::AutoLocker locker(context()); |
200 | 200 |
201 if (context()->isContextClosed()) { | 201 if (context()->isContextClosed()) { |
202 exceptionState.throwDOMException( | 202 exceptionState.throwDOMException( |
203 InvalidStateError, | 203 InvalidStateError, |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 | 603 |
604 void AudioNode::updateChannelCountMode() | 604 void AudioNode::updateChannelCountMode() |
605 { | 605 { |
606 m_channelCountMode = m_newChannelCountMode; | 606 m_channelCountMode = m_newChannelCountMode; |
607 updateChannelsForInputs(); | 607 updateChannelsForInputs(); |
608 } | 608 } |
609 | 609 |
610 } // namespace blink | 610 } // namespace blink |
611 | 611 |
612 #endif // ENABLE(WEB_AUDIO) | 612 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |