本文整理汇总了C++中AudioNodeOutput::disconnectAllInputs方法的典型用法代码示例。如果您正苦于以下问题:C++ AudioNodeOutput::disconnectAllInputs方法的具体用法?C++ AudioNodeOutput::disconnectAllInputs怎么用?C++ AudioNodeOutput::disconnectAllInputs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AudioNodeOutput
的用法示例。
在下文中一共展示了AudioNodeOutput::disconnectAllInputs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: connect
bool AudioNode::connect(AudioNode* destination, unsigned outputIndex, unsigned inputIndex)
{
ASSERT(isMainThread());
AudioContext::AutoLocker locker(context());
// Sanity check input and output indices.
if (outputIndex >= numberOfOutputs())
return false;
if (destination && inputIndex >= destination->numberOfInputs())
return false;
AudioNodeOutput* output = this->output(outputIndex);
if (!destination) {
// Disconnect output from any inputs it may be currently connected to.
output->disconnectAllInputs();
return true;
}
if (context() != destination->context())
return false;
AudioNodeInput* input = destination->input(inputIndex);
input->connect(output);
// Let context know that a connection has been made.
context()->incrementConnectionCount();
return true;
}
示例2: disconnect
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->disconnectAllInputs();
}