Re: how can I pause aufileplayer ?
Re: how can I pause aufileplayer ?
- Subject: Re: how can I pause aufileplayer ?
- From: Doug Wyatt <email@hidden>
- Date: Mon, 12 Sep 2005 15:04:29 -0700
On Sep 12, 2005, at 12:32, thomas rettich wrote:
Hi,
I have set up an augraph with aufileplayer as the generator. I
tried pausing a track by calling augraphstop. however, when I do
this, I can't start the graph again even if re-initialize it. so
what would be the best way to pause the track.
There are a lot of different ways you could implement pausing with
AUAudioFilePlayer, but stopping and restarting the graph should be a
good and simple one.
One key thing to do is to call AudioUnitReset() on the
AUAudioFilePlayer when you want to stop or pause. This will clear its
event schedule. You'll want to reschedule events and prime again when
restarting.
I suspect that if you are stopping and restarting the graph, the file
player is attempting to continue, but the timestamps at which the
events are scheduled are out of line with the ones coming from the
output unit, either way too far in the future or past.
+ when the complete file is played the application crashes .. is
there some sort of notifcation mechanism I can use in a cocoa app
to catch this problem .. if so, what are the steps I have to do ?
Let's see the crash log please...
--
Doug Wyatt
Core Audio, Apple
_______________________________________________
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