I am trying to connect an AudioFilePlayer AudioUnit to an AU3DMixerEmbedded Audio Unit, but I have no success.
That's what I'm doing:
This does not work: it aborts when AUGraphInitialize fails with error 10868 (kAudioUnitErr_FormatNotSupported). I think the problem is due to a mismatch in the audio format between the file player and the mixer. I think this is because: - If I comment on the connection of filePlayerNode to mixerNode ( AUGraphConnectNodeInput(_graph, filePlayerNode, 0, mixerNode, 0) ) and comment on step 6, no error messages are reported. - If I replaced step 3 by connecting filePlayerNode directly to outputNode ( AUGraphConnectNodeInput(_graph, filePlayerNode, 0, outputNode, 0) ), then the sound is played.
What steps am I missing when connecting filePlayerNode to mixerNode?
Here is the full code. This is based on Apple code sample and other samples I found from interwebs. ( AUGraphStart is called the last):
- (id)init { self = [super init]; if (self != nil) { {
Benedict cohen
source share