it turns out this is really f*cking complicated.
Previously i had a channel io of "0-2 0-8". I changed to "0-2 0-4" which is working a bit better (i.e passing enough of auval's tests for Logic & Reaper to open it). I think this is indicating a few problems here:
1) need to support the kAudioUnitProperty_SupportedChannelLayoutTags and kAudioUnitProperty_AudioChannelLayout properties to specify pairs of stereo buses
2) need to attach the remaining scratch buffers for channels > 2
3) need to synchronise the buffers coming from IPlugAU::RenderProc(). IPlugAU::RenderProc() gets called once for each output bus, which are stereo pairs, except for in Live, where you have one bus with four/eight channels ( I think this is incorrect on Ableton's part).
This means that in Logic and Reaper _this->ProcessBuffers((AudioSampleType) 0, nFrames); is getting called twice (in my "0-2 0-4" config) and causing glitchy output, since ProcessDoubleReplacing() is getting called twice for each block.
|