Logic + Sidechain
Logic + Sidechain
- Subject: Logic + Sidechain
- From: "Kenneth Weiss" <email@hidden>
- Date: Thu, 5 Jul 2007 01:56:41 -0400
- Thread-topic: Logic + Sidechain
Hi,
I am implementing side chain support for some plug-ins. It works fine in AU Lab, but when running the same plug-ins in Logic, the side-chain bus seems to transmit the same as the input buffers (the same pointers as the input), even after selecting a track for the side-chain on the input menu. (Same configuration with Logic plugs works fine)
It seems that I must be doing something wrong with logic.
Our plug-in is based on the AUEffectBase.
Here is how the side-chain is implemented:
CWSAU::CWSAU()
{
if(IsSideChain())
{
CreateElements();
Inputs().SetNumberOfElements(2);
}
}
In the render before the call to ProcessBufferList, the side chain is pulled.
ComponentResult CWSAU::Render(AudioUnitRenderActionFlags & ioActionFlags,
const AudioTimeStamp & inTimeStamp,
UInt32 inNumberFrames)
{
mValidSCBus = 0 ;
if( IsSideChain() )
{
AUInputElement *theSC_Input = GetInput(1);
ComponentResult result = theSC_Input->PullInput(ioActionFlags, inTimeStamp, 0 /* element */, inNumberFrames);
if (result == noErr )
mValidSCBus = & theSC_Input->GetBufferList();
}
return AUEffectBase::Render (ioActionFlags, inTimeStamp, inNumberFrames);
}
OSStatus CWSAU::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags,
const AudioBufferList &inBuffer,
AudioBufferList & outBuffer,
UInt32 inFramesToProcess)
{
if(mValidSCBus)
for (iBuff = 0; iBuff < mValidSCBus->mNumberBuffers; ++iBuff)
{
// go through all channels in current sidechain buffer
for (iChan = 0, pChannelBufferStart = static_cast<float*>(mValidSCBus->mBuffers[iBuff].mData);
(iChan < mValidSCBus->mBuffers[iBuff].mNumberChannels);
++iChan, ++pChannelBufferStart)
{
...collect the side-chain buffers here…
}
}
_______________________________________________
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