本文整理汇总了C++中SynthGroupElement::Render方法的典型用法代码示例。如果您正苦于以下问题:C++ SynthGroupElement::Render方法的具体用法?C++ SynthGroupElement::Render怎么用?C++ SynthGroupElement::Render使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SynthGroupElement
的用法示例。
在下文中一共展示了SynthGroupElement::Render方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Outputs
ComponentResult AUInstrumentBase::Render( AudioUnitRenderActionFlags & ioActionFlags,
const AudioTimeStamp & inTimeStamp,
UInt32 inNumberFrames)
{
PerformEvents(inTimeStamp);
UInt32 numOutputs = Outputs().GetNumberOfElements();
for (UInt32 j = 0; j < numOutputs; ++j)
{
AudioBufferList& bufferList = GetOutput(j)->GetBufferList();
for (UInt32 k = 0; k < bufferList.mNumberBuffers; ++k)
{
memset(bufferList.mBuffers[k].mData, 0, bufferList.mBuffers[k].mDataByteSize);
}
}
UInt32 numGroups = Groups().GetNumberOfElements();
for (UInt32 j = 0; j < numGroups; ++j)
{
SynthGroupElement *group = (SynthGroupElement*)Groups().GetElement(j);
OSStatus err = group->Render(inNumberFrames);
if (err) return err;
}
mAbsoluteSampleFrame += inNumberFrames;
return noErr;
}
示例2: Outputs
OSStatus AUInstrumentBase::Render( AudioUnitRenderActionFlags & ioActionFlags,
const AudioTimeStamp & inTimeStamp,
UInt32 inNumberFrames)
{
PerformEvents(inTimeStamp);
AUScope &outputs = Outputs();
UInt32 numOutputs = outputs.GetNumberOfElements();
for (UInt32 j = 0; j < numOutputs; ++j)
{
GetOutput(j)->PrepareBuffer(inNumberFrames); // AUBase::DoRenderBus() only does this for the first output element
AudioBufferList& bufferList = GetOutput(j)->GetBufferList();
for (UInt32 k = 0; k < bufferList.mNumberBuffers; ++k)
{
memset(bufferList.mBuffers[k].mData, 0, bufferList.mBuffers[k].mDataByteSize);
}
}
UInt32 numGroups = Groups().GetNumberOfElements();
for (UInt32 j = 0; j < numGroups; ++j)
{
SynthGroupElement *group = (SynthGroupElement*)Groups().GetElement(j);
OSStatus err = group->Render((SInt64)inTimeStamp.mSampleTime, inNumberFrames, outputs);
if (err) return err;
}
mAbsoluteSampleFrame += inNumberFrames;
return noErr;
}