Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using ScheduledAudioFileRegion in AUAudioFilePlayer




On 20/03/2007, at 4:53 PM, Jan Calta wrote:

Hello,

I'm starting with AUAudioFilePlayer and I wonder if anybody could make
clear using of ScheduledAudioFileRegion.mCompletionProcUserData for
me?

I'm trying to get feedback about completion of audio file playback. I
read a thread about completion callbacks as well as the documentation
in AudioUnitProperties.h and conclusion was that callback is called
after scheduling the reading of the file, not after finishing its
playback.

Yes, that's correct

Nevertheless I got these callbacks quite near (and
consequently right at) the real end of the playback when priming the
file with value of 0 (default value). I wonder if there is a way to
notice the end of the playback via completion callbacks?

Not at this time. the user data is just a pointer something you need when the callback is fired. Typically it would be a pointer to a "this" object in C++, or the address of some kind of data structure, etc. You provide this pointer when you instantiate the completion proc, and then when the completion proc is called, the user data pointer you gave it is given back to you


Bill


To get reason of calling the callback I probably need to use mCompletionProcUserData field of ScheduledAudioFileRegion (beside using mCompletionProc of course), right? But I have no idea how. Could anybody make it clear when and how the mCompletionProcUserData is filled or provide an example?

Thank you very much for any help

Jan Calta
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/coreaudio-api/email@hidden

This email sent to email@hidden

--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/coreaudio-api/email@hidden

This email sent to email@hidden
References: 
 >using ScheduledAudioFileRegion in AUAudioFilePlayer (From: "Jan Calta" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.