• 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
Re: Determining AUFilePlayer completion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining AUFilePlayer completion


  • Subject: Re: Determining AUFilePlayer completion
  • From: Doug Wyatt <email@hidden>
  • Date: Mon, 7 Nov 2005 08:50:17 -0800

The completion callback occurs when the event has been completely read from disk, not when it has been played. The intent here is that this is a logical time for the client to queue another event.

The way to find out if an event has been played is:
1. compute the sample frame number at which it will be complete (timestamp + length in sample frames)
2. look at the player's start time (which you know if you set it to a positive number; if you set it to -1 to start "ASAP", then ask the AU for the start time and it will tell you the timestamp at which it actually did start)
3. poll the AU's render timestamps to see if the end time of the event has been reached. There are several ways to do this:
a. kAudioUnitProperty_CurrentPlayTime
b. install a render notification on the AU
c. you may have code observing timestamps elsewhere in the chain (though not in your case it seems)


Doug

On Nov 5, 2005, at 10:09, Frank Vernon wrote:
Hi-

I have a graph: fileplayer->timepitch->output with a completion callback registered for the fileplayer. It seems like the completion proc is getting called before audio is actually done playing. Could this be due to the fact it does not take into account the latency of playing through the timepitch node? Is there something else I've likely missed? In any event, what is the 'correct' method to determine when the audio served by the fileplayer is actually complete at the output of the graph?

Thanks-
Frank Vernon

-- Doug Wyatt Core Audio, Apple

_______________________________________________
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


References: 
 >Determining AUFilePlayer completion (From: Frank Vernon <email@hidden>)

  • Prev by Date: Audio driver outside kernel
  • Next by Date: RE: Reference AU host, was Re: Channels and frames
  • Previous by thread: Determining AUFilePlayer completion
  • Next by thread: IsIndexedParam 'alternative'
  • Index(es):
    • Date
    • Thread