Callback [was PlayFile]
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,
¤tTimeStamp, &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