I am a newbie to CoreAudio, so I decided to work on a small project involving CA. Ultimately, I want to my app to play one file on the left channel and another file on the right channel of my MBP's built-in speakers. I was able to do that in AU Lab and used ``Print Session'' to examine the graph topology, as shown below:
AudioUnitGraph 0x867C84:
Member Nodes:
node 1: desc uoua laha lppa, instance 0x980000 O I
node 2: desc xmua xmxm lppa, instance 0x980001 O I
node 3: desc xmua xmxm lppa, instance 0x820002 O I
node 4: desc xmua xmxm lppa, instance 0x820003 O I
node 5: desc ngua lpfa lppa, instance 0x820005 O I
node 6: desc ngua lpfa lppa, instance 0x820006 O I
Connections:
node 4 bus 0 => node 3 bus 0 [2 ch, 48000 Hz]
node 3 bus 0 => node 2 bus 0 [1 ch, 48000 Hz]
node 3 bus 1 => node 2 bus 1 [1 ch, 48000 Hz]
node 5 bus 0 => node 4 bus 0 [1 ch, 48000 Hz]
node 6 bus 0 => node 4 bus 1 [1 ch, 48000 Hz]
node 2 bus 0 => node 1 bus 0 [2 ch, 48000 Hz]
In my code, I created two synth nodes, one matrix mixer and a default output node.
Now my questions are how does the matrix mixer work? how does one do the channel mapping from AUMatrixMixer to DefaultOuput or from Synth node to AUMatrixMixer? Is there any sample code?
Also, how do I map only one output channel to an input bus. For example, node 5 in the above AUGraph is a fileplayer and it has two output channels (stereo), but AU Lab is mapping only one channel to the input bus of a mixer. How do you do that in the code? (use the StreamFormat property??)
Thanks,
Marco