I created custom callback for mixing sounds in real time for a timing music application using ExtAudioFile.
OSStatus MyAURenderCallack (
void *inRefCon,
AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumberFrames,
AudioBufferList *ioData
);
I need to change the time every single callback is called.
I’m checking how many ticks each new callback is called with …
soundStructPointerArray[inBusNumber].callTime=mach_absolute_time()-soundStructPointerArray[inBusNumber].last;
soundStructPointerArray[inBusNumber].last=mach_absolute_time();
In the simulator i get aprox … 11595773
I need to change this time to be more quick. Anyone know how I could do it?
You can use the audio session property kAudioSessionProperty_PreferredHardwareIOBufferDuration to request more frequent audio unit buffer callbacks.