When I play audio from a scheduled buffer, that loops indefinitely, I expected the completion handler to be called at the end of every loop. However, it is only called once. Is this the expected behavior or is this a bug?
I created a crazy workaround by having the completion handler schedule a new buffer with its own completion handler, essentially recursive but this is doomed for failure. Additionally, I've read about scheduling a buffer in the future but I am doing something wrong. In my program know how many frames have elapsed since the beginning of the program or the frame where I want to begin playing a buffer. How do I convert my framecount into a time a future time. All of my buffers will be in the future. futureFrameCount = ..some frame in the future startTime = AVAudioTime(sampleTime: AVAudioFramePosition(futureFrameCount), atRate: sampleRate) player.scheduleBuffer(buffer, atTime: startTime, options: .loop, completionHandler: compHandler) Thank you, W.
_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com This email sent to [email protected]
