• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
player.scheduleBuffer loops and completion handler (bug?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

player.scheduleBuffer loops and completion handler (bug?)


  • Subject: player.scheduleBuffer loops and completion handler (bug?)
  • From: Waverly Edwards <email@hidden>
  • Date: Mon, 05 Nov 2018 16:56:11 +0000
  • Thread-topic: player.scheduleBuffer loops and completion handler (bug?)

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Next by Date: iPad Pro 3 audio distortion?
  • Next by thread: iPad Pro 3 audio distortion?
  • Index(es):
    • Date
    • Thread