• 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
When has playback finished?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

When has playback finished?


  • Subject: When has playback finished?
  • From: Norman Franke <email@hidden>
  • Date: Thu, 16 Mar 2006 20:35:01 -0800

I asked this some time ago, and didn't get a response. Forgive me if this is really simple...

I'm getting into Core Audio, and a one thing is perplexing me. I'm playing a generated sound via the default Audio Unit. I set a render procedure via kAudioUnitProperty_SetRenderCallback which then calls AudioConverterFillComplexBuffer to convert from the native format I'm using to whatever I'd like to play. This all works pretty well with one exception: how do I know when the sound has finished playing?

I can attempt to count samples after the call to AudioConverterFillComplexBuffer and translate that into a time, but how do you even determine when the sound started to play? The render procedure has as an input a AudioTimeStamp, but the documentation says that is the current timestamp, which is really useless.

It's important to not terminate playback before all samples are finished, and also important to not play too long. How can this be done? I've spent several hours googling and searching through the mailing list archives, to no avail.

The sounds in question can range from a second to several minutes long.

-Norman


 _______________________________________________
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

  • Follow-Ups:
    • Re: When has playback finished?
      • From: William Stewart <email@hidden>
  • Prev by Date: AUParameterListener notifying for events before listener is created?
  • Next by Date: Some AudioUnits crash WhackedTV sample code
  • Previous by thread: When has playback finished?
  • Next by thread: Re: When has playback finished?
  • Index(es):
    • Date
    • Thread