Hi,
I am trying to restructure my audiograph to add a callback between the fileplayerAU and the mixerAU.
So far, I am building the graph as before, but not connecting the node from the fileplayer output to the mixer input bus. I'm setting the callback on the mixer bus as follows:
AURenderCallbackStruct filePlayerCallbackStruct; filePlayerCallbackStruct.inputProc = &filePlayerCallback; filePlayerCallbackStruct.inputProcRefCon = soundStructArray; UInt32 busNumber = 0; NSLog (@"Registering the render callback with mixer unit input bus %u", busNumber); // Set a callback for the specified node's specified input result = AUGraphSetNodeInputCallback ( processingGraph, mixerNode, busNumber, &filePlayerCallbackStruct ); if (noErr != result) {[self printErrorMessage: @"AUGraphSetNodeInputCallback" withStatus: result]; return;} In the callback function I am using
renderErr = AudioUnitRender(fileplayerUnit, ioActionFlags, inTimeStamp, bus1, inNumberFrames, ioData); if (renderErr < 0) { return renderErr;
With this graph structure, setting the kAudioUnitProperty_ScheduledFileRegion on the fileplayer fails. If I revert to the normal node connection, it works.
Do I need to explicitly set the ASBD on the mixer input bus?
any suggestions would be appreciated.
thanks
Robert Carroll RSM Records Toronto
|