I have an AUGraph of AUFilePlayer -> AUTimePitch -> default output, which is all working nicely.
I am playing numerous audio regions, one at a time under user control, from within a single file through this Graph. I would like to get a notification of playback completion when each region (or the whole file) stops playing, whether by the user hitting a STOP button, or by the region or file being completed. I am using mCompletionProc of the region struct to point to my post-completion routine.
Here's the problem: according to everything I read, I should get to this completion routine much earlier than I do - it's supposed to happen when the region is ready and queued up for playback, not when it actually completes. But I appear to be not getting to my completion routine until precisely the end of playback - not earlier. Or in other words, it's actually working the way I (and others) would like it to, instead of what is documented, and experienced by others. This behavior is consistent regardless of playback speed through AUTimePitch.
I am guessing that this is an unadvertised benefit of running the FileAU through AUTimePitch before output.
So my questions are:
Is my guess correct as to the cause of this? Why? Is this what is supposed to happen? Can I count on this continuing to happen in the future?
Thanks…
-H
|