• 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
Callback [was PlayFile]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Callback [was PlayFile]


  • Subject: Callback [was PlayFile]
  • From: Michael Hanna <email@hidden>
  • Date: Wed, 14 Dec 2005 22:01:25 -0800

Hi all,

I'm assuming this call is done in a callback. How do I setup and create this callback? Pardon my naive questions.

Michael
On 9-Dec-05, at 12:43 PM, William Stewart wrote:

- how can I determine at what point the 'playback head' is at?

AudioTimeStamp currentTimeStamp;
UInt32 dataSize = sizeof(currentTimeStamp);
OSStatus result = AudioUnitGetProperty(fileAU, kAudioUnitProperty_CurrentPlayTime, kAudioUnitScope_Global, 0, &currentTimeStamp, &dataSize);


Then the currentTimeStamp.mSampleTime will give you the sample number the file is currently being played at - this is in the time scale/sample rate of the file. If your file is at a different sample rate than the file player's output sample rate, you'll need to convert this number:

There's one thing you should do here that is missing from the SDK's example:

_______________________________________________ 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: Callback [was PlayFile]
      • From: William Stewart <email@hidden>
References: 
 >MTCoreAudio (From: Michael Hanna <email@hidden>)
 >Re: MTCoreAudio (From: William Stewart <email@hidden>)
 >PlayFile [was Re: MTCoreAudio] (From: Michael Hanna <email@hidden>)
 >Re: PlayFile [was Re: MTCoreAudio] (From: William Stewart <email@hidden>)

  • Prev by Date: Re: QuickTime Music Synthesizer + Core Audio
  • Next by Date: Streaming Audio
  • Previous by thread: Re: PlayFile
  • Next by thread: Re: Callback [was PlayFile]
  • Index(es):
    • Date
    • Thread