I use audio unit (subtype: VPIO),to play the audio .
The audio sent by the network have jitter
question: 1 .The audio unit start time is not fixed,sometimes 250MS,sometimes 400MS (in different iPhone iPad ) 2 . the play-callback period not even sometime .such us 8K Sample_rate, Most of times are called (playback callback ) in 23milliseconds.340~342BYTE. but occasionally, the callback time interval 130+ ms,And ioData->mBuffers[0].mDataByteSize= 340 byte alse. I didn't make the time-consuming operation in the render callback function . Just copy the data to IOdata. and data is enough.
PlayCallback(void *inRefCon,
AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumberFrames,
AudioBufferList *IOData){copy data from my buffer }
I want to know what will affect audio render callback cycle(period)?
Background mode will often cause the callback interval or buffer size to increase by 4X, likely to save on battery power (longer intervals allows the OS to do audio hardware DMA less often, or wake up your app from sleep/nap mode less often).
Turning Siri voice recognition on or off may affect how long it takes to power up the microphone chips and related audio input circuitry. Whether any other app also has an audio session configured may also affect start-up time. The audio circuitry is different in different models of iOS devices.