Hi,
very interesting thread, I'm trying to get sidechains to work too.
As far as I understand right now, to get access to audio from the second input (bus 1) there are 2 ways :
AudioBufferList sidechainBufferList = theSidechainInput->GetBufferList();
or : float* scChannelPtr = theSidechainInput->GetChannelData(0);
In my AU this works both, when I process in mono with channel layout { 1, 1 }.
Now, when I test my channel layout for stereo { 2, 2 } something strange happens:
The AudioBufferList tells me, that there are 2 buffers, as expected. But when I access them both with
float* sidechainInputL = (Float32*)sidechainBufferList.mBuffers[0].mData; float* sidechainInputR = (Float32*)sidechainBufferList.mBuffers[1].mData;
the second one ( Right ) does not contain audiodata. It seems like it points to some wrong place.
When I use float* scChannelPtrL = theSidechainInput->GetChannelData(0); float* scChannelPtrR = theSidechainInput->GetChannelData(1);
everything is fine and I hear the sidechain Input in stereo.
Does anybody know how that ? Is GetChannelData(n) the prefered way ?
Another thing, that I do not realy understand is that my AU passes auval test, and it works fine in logic8, but auval gives me a warning :
WARNING: AU Reports Processing in Place; Input buffer[0]:0xcf000 and Output buffer[0]:0xc7000 are not the same
I searched the list and had a look at AUEffectBase but did not find anytthing. I just found, that when I use
SetProcessesInPlace( FALSE );
in Initialize() than there is no warning in auval.
What is mProcessesInPlace for ? Do I have to set it to false when I override Render() instead of using kernels or ProcessBufferList() ?
Thanks
Bernd
Bill and Sophia,
thank you so much for your help!! I'll try your suggestions and see if they work for me.
Thanks again, --th
|