Re: Audio Units - newbie questions
Re: Audio Units - newbie questions
- Subject: Re: Audio Units - newbie questions
- From: Olivier Tristan <email@hidden>
- Date: Wed, 12 Oct 2005 14:45:16 +0200
Muon Software Ltd - Dave wrote:
uint numOutputBusCount = Outputs().GetNumberOfElements();
uint channelSoFar = 0;
for (uint i = 0; i < numOutputBusCount ; i++)
{
AUOutputElement *output = GetOutput(i);
AudioBufferList &outputBufferList = output->PrepareBuffer(nFrames);
AUBufferList::ZeroBuffer(outputBufferList);
uint channelCount = outputBufferList.mNumberBuffers;
for (uint j = 0; j < channelCount ; j++)
{
m_ptrAudioBuffers[channelSoFar+j] =
reinterpret_cast<float*>(outputBufferList.mBuffers[j].mData);
}
channelSoFar += channelCount ;
}
There's a downside to doing things this way. If a host doesn't support
multiple outputs and only gives us one bus to render onto, we'll have 6
pointers that are still null in m_ptrAudioBuffers at the end of this loop.
This is why I try to work out how many busses I've been given and come up
with a way of filling all eight pointers that I need:
Best thing would be that your plugin is aware of the current number of
buses and their configuration.
Otherwise it will sound more like a hack to me.
Moreover your output menu selection should not display multiples outputs
when there is only one imho.
Regards,
--
Olivier Tristan
Ultimate Sound Bank
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden