Re: AUSoundFilePlayer: Changing Loop Points on the Fly
Re: AUSoundFilePlayer: Changing Loop Points on the Fly
- Subject: Re: AUSoundFilePlayer: Changing Loop Points on the Fly
- From: Doug Wyatt <email@hidden>
- Date: Mon, 12 Dec 2005 14:49:27 -0800
On Dec 10, 2005, at 5:48, Mark Coniglio wrote:
I am wondering if there is a way to change loop points on the fly
using kAudioUnitProperty_ScheduledFileRegion with the
AUSoundFilePlayer.
It seems that once you've scheduled something to play -- it is
going to play that chunk until it is complete. I'm trying to
emulate the on-the-fly loop start/loop end manipulation available
in a QT Movie -- and thoughts on how to do this?
Specifically, can the region start and end points be changed once
scheduling has happened? Or do you have to stop playback and
reschedule?
For example, if
1) I'm playing a region from 0 to 10,000 frames
2) Playback is currently at frame 5,000,
3) I change the loop points to 2,000 and 6,000
Is there any way to do that so that I don't have to start from
2,000, but can continue from 5,000, get to 6,000 and loop back to
2,000?
It would seem that you could use the callback to do this, but
you're not going to get notified until you get close to 10,000 in
the example above -- but really I need to know when I'm getting
close to 6,000 to reschedule...
Best Wishes,
Mark
Hi Mark,
Unfortunately I can't think of a way to do this short of resetting
and restarting, which of course will glitch. AUAudioFilePlayer copies
the events the client supply it, so there's no obvious way to give
the client a way to refer to and manipulate an event "in flight."
You might try building on AUScheduledSoundPlayer ...
Cheers
Doug
--
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