Hi,
With an audiograph fileplayer, when does the audiofileregion.mCompletionProc fire? Is this documented anywhere?
I assumed this meant once the fileregion has been played, but it seems to occur when it is read into memory.
memset (&fileRegion.mTimeStamp, 0, sizeof(fileRegion.mTimeStamp));
fileRegion.mTimeStamp.mFlags = kAudioTimeStampSampleTimeValid;
fileRegion.mTimeStamp.mSampleTime = 0;
fileRegion.mCompletionProc = completionListenerProc;
fileRegion.mCompletionProcUserData = NULL;
fileRegion.mAudioFile = inputFile;
fileRegion.mLoopCount = 0; //do not loop
fileRegion.mStartFrame = 0;
fileRegion.mFramesToPlay = (UInt32)44100;
void completionListenerProc(
//OSStatus completionListenerProc(
void * inRefCon,
AudioUnit ci,
AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement)
{
NSLog(@"completionListenerProc: fileplayer complete!");
//return noErr;
}