My code is working nicely on 10.5 and 10.6, but targeting 10.4 I've run into a problem I can't figure out. It appears I'm crashing while trying to add an output node to a graph. I create the graph, open it, and then try to add a node that should be a HAL Output node.
result = NewAUGraph(&graph);
// Open the graph if( !result )
{
CAShow( graph );
result = AUGraphOpen(graph);
if (result)
{
NSLog( @"AUGraphOpen result %ld %4.4s", result, (char*)&result);
return NO;
}
CAShow( graph );
}
AUComponentDescription output_desc( kAudioUnitType_Output, kAudioUnitSubType_HALOutput, kAudioUnitManufacturer_Apple ); result = AUGraphAddNode(graph, &output_desc, &outputNode);
if (result)
{
NSLog( @"AUGraphAddNode 1 error %ld %4.4s", result, (char*)&result);
return NO;
}
And it never makes it past that call to AUGraphAddNode. The NSLog to print an error is never called, nor is a debug statement immediately after that call. Again, it only fails on Tiger (10.4.11). The calls to CAShow both show a graph with no nodes, connections, or events queued.
I am using MTCoreAudio, and I make some calls to that prior to the above. But it all seems to work, and it should be okay on Tiger, I think.
Is there anything wrong with the above, or am I leaving a time bomb elsewhere and only coincidentally failing at this call?
Thanks in advance, Kevin
|