Re: Individual On/Off Audio File Player
Re: Individual On/Off Audio File Player
- Subject: Re: Individual On/Off Audio File Player
- From: Doug Wyatt <email@hidden>
- Date: Fri, 3 Feb 2006 10:04:35 -0800
On Feb 3, 2006, at 6:52, Mark Coniglio wrote:
I am wondering if it is possible to enable/disable playback for
multiple Audio File Players connected to a single mixer.
For instance, let's say the graph has two Audio File Players
connected to a single 3D Mixer, which is in turn connected to the
Default Output audio unit. I'd like to trigger the playback of each
Audio File Player individually, potentially multiple times.
Right now, if the two players are connected to the mixer, and I
start the graph, both start playing immediately, and it isn't clear
to me how I can re-trigger them without stopping and starting the
graph. Furthermore, I'm not sure to independently trigger the two
Audio File Player units.
Sorry if this is a dunce question -- I just don't see the obvious
answer.
Hi Mark,
The players aren't starting because the graph has started. They're
starting because you've scheduled events, primed the units, and given
them start times which are either "now" or in the past.
You control when they start via
kAudioUnitProperty_ScheduleStartTimeStamp.
To stop the file player, call AudioUnitReset on it -- this removes
all the events from the schedule. To restart, schedule events, prime,
and set a start time.
HTH,
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