Hello List,
I'm a little stuck with the kAudioUnitSubType_MultiChannelMixer AudioUnit on the Mac:
I'm creating audio streams with 8 channels of data and want them to output through the AUHAL. When the output device I use has 8+ channels everything works as expected: The 8 data channels are mapped 1:1 to the device channels. So this obviously works.
Now when I want to output these 8 channels on a device with only 2 out-channels I understand I have to mix the audio down. So I added a kAudioUnitSubType_MultiChannelMixer to the graph and set the input format to 8 channels, output format to 2 channels. I assume this should mix down the incoming 8 channels to a 2 channel stream.
So my graph looks like this: [data input callback] ---8ch---> [mixer] ---2ch---> [AUHAL] Note: All the units use just one bus.
Now what happens is that you can only hear the first 2 channels of the incoming data. The remaining 6 channels seem to get discarded by the mixer. (I tried running 8->8 channels through the mixer and everything works then - no channels get discarded. Also mixing stereo -> mono works too).
Am I making false assumption? Do I have to set any parameters for this kind of mixing to work? Or is the kAudioUnitSubType_MultiChannelMixer not the right unit at all? (I could do the mix down by hand in the data callback but that's something I'd rather not do.)
Thanks for your input Leon |