void AudioNode::disconnect(unsigned outputIndex, ExceptionCode& ec) { ASSERT(isMainThread()); AudioContext::AutoLocker locker(context()); // Sanity check input and output indices. if (outputIndex >= numberOfOutputs()) { ec = INDEX_SIZE_ERR; return; } AudioNodeOutput* output = this->output(outputIndex); output->disconnectAll(); }
void AudioNode::disconnect(unsigned outputIndex, ExceptionState& exceptionState) { ASSERT(isMainThread()); AudioContext::AutoLocker locker(context()); // Sanity check input and output indices. if (outputIndex >= numberOfOutputs()) { exceptionState.throwDOMException( IndexSizeError, "output index (" + String::number(outputIndex) + ") exceeds number of outputs (" + String::number(numberOfOutputs()) + ")."); return; } AudioNodeOutput* output = this->output(outputIndex); output->disconnectAll(); }