So far I have had zero success, is this even possible? I was first using a MultiChannelMixer, and after many fruitless hours googling, searching the headers and docs I determined it is not possible, at least not to my limited ability and knowledge.
So I switched to using the AU3DMixerEmbedded, which I naively assumed I could simply set the azimuth on to get the desired effect. However when I try I get a kAudioUnitErr_InvalidParameter error. The header does state that "only some of these parameters are available in the embedded implementation of this AU" but no where do I find which are and which are not. Seems silly to me that this parameter would not be supported.
So what am I doing wrong? Surely there must be a way to achieve such a simple effect.
- (OSStatus)panTrack:(Float32)pan track:(int)num
{
//kAudioUnitParameterUnit_Pan
//pan is -1->1
Float32 azimuth = 180.0 * pan;
NSLog(@"Panning Azimuth of track %d to %f", num, azimuth);
status = AudioUnitSetParameter(mMixerUnit,
k3DMixerParam_Azimuth,
kAudioUnitScope_Output,
num,
azimuth,
0);
checkStatus(status);
return status;
}
My AUGraph looks like this [file data] ->3D mixer -> Multichannel Mixer(for "master" volume con) -> remoteIO output ->[sound!]
AudioUnitGraph 0xDBAD003:
Member Nodes:
node 1: 'auou' 'rioc' 'appl', instance 0xd331c0 O I
node 2: 'aumx' '3dem' 'appl', instance 0xd34430 O I
node 3: 'aumx' 'mcmx' 'appl', instance 0xd4a1d0 O I
Connections:
node 3 bus 0 => node 1 bus 0 [2 ch, 44100 Hz]
node 2 bus 0 => node 3 bus 0 [2 ch, 44100 Hz]
Input Callbacks:
{0x6ba6, 0xd31c20} => node 2 bus 0 [1 ch, 44100 Hz]
{0x6ba6, 0xd31c20} => node 2 bus 1 [1 ch, 44100 Hz]
{0x6ba6, 0xd31c20} => node 2 bus 2 [1 ch, 44100 Hz]
thanks a bunch!
-raleigh