I need an ability to track the frame position in render callback in AudioUnit v3. I noticed that the callback is called about 100 times per second with frameCount
value of 512. Hence, using code like this:
^AUAudioUnitStatus(..., AUAudioFrameCount frameCount, ...) {
... rendering code
self.framePosition += frameCount
}
Results in framePosition
being set to about 200000 for piece of track with 5 seconds length and 48 kHz.
Documentation says that frameCount
is “The number of sample frames to render.”. But 100 times per second with 512 frames is about 3000000 frames per minute, it’s nonsense.
All literature and other sources I’ve checked out states that such a frequent calls are fine, as well as a value of frameCount
. But I can’t understand how does it work. Can anyone help?