MultiChannel Mixer on Snow Leopard, no errors but no sound
MultiChannel Mixer on Snow Leopard, no errors but no sound
- Subject: MultiChannel Mixer on Snow Leopard, no errors but no sound
- From: Graeme MacDonald <email@hidden>
- Date: Wed, 20 Oct 2010 11:02:16 -0500
Hi, I am attempting to switch from using the 3D mixer unit to the multichannel mixer unit. With the 3D mixer everything seems to work fine,
when I replace it with the multichannel mixer I end up with no sound. No errors are reported.
I am connecting Audio File Player units to the mixer which in turn is connected to an output unit. I have set the stream formats on the mixer before connecting it to the graph.
These are some snippets of code that pertain to how I'm setting it up.
//Setting the mixer output format, the same format is used on the input of the output unit.
X(@"Set mixer output format",AudioUnitSetProperty(mixerUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 0, &asbd, sizeof(audioFormat)));
....
//connect file player units
UInt32 numbuses = 0;
if (rec != nil) numbuses += tracks.count;
UInt32 size = sizeof(numbuses);
X(@"set input bus count",AudioUnitSetProperty( mixerUnit,
kAudioUnitProperty_ElementCount,
kAudioUnitScope_Input,
0,
&numbuses,
size ));
delete[] fileUnits;
fileUnits = new AudioUnit[64];
for (int i=0; i<numbuses; ++i) {
AudioUnit fileUnit;
AUNode fileNode;
int bus = i;
X(@"Add file node",AUGraphAddNode(mGraph, &file_desc, &fileNode ));
X(@"Mixer Node Info",AUGraphNodeInfo(mGraph, fileNode, NULL, &fileUnit ));
AudioStreamBasicDescription aF = self.audioFormat;
X(@"Set file player output format",AudioUnitSetProperty(fileUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 0, &aF, sizeof(audioFormat)));
X(@"Set mixer input format",AudioUnitSetProperty(mixerUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, bus, &aF, sizeof(audioFormat)));
X(@"Connect file to mixer",AUGraphConnectNodeInput(mGraph, fileNode, 0, mixerNode, bus ));
fileUnits[i] = fileUnit;
}
...
//connect mixer to output
X(@"Connect mixer to output",AUGraphConnectNodeInput(mGraph, mixerNode, 0, outputNode, 0 ));
After graph initialization I proceed to load files in the appropriate file units. After starting the graph, CAShow displays this. (the varispeed unit is not being used in the test)
AudioUnitGraph 0x2200B5:
Member Nodes:
node 1: 'aufc' 'vari' 'appl', instance 0x820004 O
node 2: 'auou' 'def ' 'appl', instance 0x810005 O I
node 3: 'aumx' 'mcmx' 'appl', instance 0x810006 O I
node 4: 'augn' 'afpl' 'appl', instance 0x810007 O I
node 5: 'augn' 'afpl' 'appl', instance 0x810008 O I
Connections:
node 4 bus 0 => node 3 bus 0 [1 ch, 44100 Hz]
node 5 bus 0 => node 3 bus 1 [1 ch, 44100 Hz]
node 3 bus 0 => node 2 bus 0 [2 ch, 44100 Hz]
CurrentState:
mLastUpdateError=0, eventsToProcess=F, isRunning=T (1)
That's about it. I tried enabling inputs for the mixer and setting volume, but neither seem to have any effect. Any insight is greatly appreciated!
Thanks,
Graeme
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden