Re: ScheduledAudioFileRegion.mCompletionProc
Re: ScheduledAudioFileRegion.mCompletionProc
- Subject: Re: ScheduledAudioFileRegion.mCompletionProc
- From: Andy Davidson <email@hidden>
- Date: Wed, 12 Dec 2012 10:04:20 -0800
- Thread-topic: ScheduledAudioFileRegion.mCompletionProc
Hi Tim
On 12/11/12 7:01 PM, "Tim Kemp" <email@hidden> wrote:
>> To keep track when a region has finished playing, you need to count the
>>frames played yourself and compare to what has been loaded.
>
>What's the best way to do that? Would a render notify on the input of the
>mixer that the file player unit is connected to work?
I had a bit of trouble getting this to work using callbacks. (I use the
audio file player). I want to know when the audio reaches EOF not when the
last region has been loaded. I had trouble with the render callbacks.
Sometime I wound up with system time, not the time relative to my time
line. Sorry I can not be more specific. I debugged this code a long time
ago.
I found it easier to calculate the playback time in sec and use a NSTimer.
Andy
>
>Thanks
>
>On 10 Dec 2012, at 02:15, Orestis Markou wrote:
>
>> The documentation states exactly that behavior, that is, you get a
>>notification when the file has been read from disk.
>>
>> To keep track when a region has finished playing, you need to count the
>>frames played yourself and compare to what has been loaded.
>>
>> On 10 Δεκ 2012, at 4:51 π.μ., Tim Kemp <email@hidden>
>>wrote:
>>
>>> Hi,
>>>
>>> Sorry for more questions. I want to be notified when a region has
>>>finished playing. I am trying to use the completion proc on the
>>>ScheduledAudioFileRegion to do this.
>>>
>>> I have set a proc up on the (only) region that my AudioFilePlayer unit
>>>is using; so far, it's called once before the short file completes. I
>>>think it's called when audio file services has completed reading the
>>>last chunk from disk.
>>>
>>> If the completion proc is the wrong way to do it, how do I get a
>>>notification when a particular region has finished playing?
>>>
>>> Thanks
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Coreaudio-api mailing list (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>>gr
>>>
>>> This email sent to email@hidden
>>
>
>
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>Coreaudio-api mailing list (email@hidden)
>Help/Unsubscribe/Update your Subscription:
>gration.com
>
>This email sent to email@hidden
_______________________________________________
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