RE: Synchronizing Multiple AUGraph's
RE: Synchronizing Multiple AUGraph's
- Subject: RE: Synchronizing Multiple AUGraph's
- From: Darrell Gibson <email@hidden>
- Date: Tue, 9 Jun 2009 11:00:08 +0100
- Acceptlanguage: en-US, en-GB
- Thread-topic: Synchronizing Multiple AUGraph's
Okay. So I have done a bit more digging through the CoreAudio SDK examples and have seen examples using the AU SetProperty to setup a AudioTimeStamp. The examples I have seen set the AudioTimeStamp mSampleTime member to -1. When this is set as the start time property I believe this means start on the next render cycle. This leaves with two questions:
1) Is there away to get the current timestamp back so I know what samples are currently being rendered in the audio content?
2) How can I schedule to rendering of an audio file to occur at a particular timestamp?
Thanks for any help or pointers you can give.
Darrell.
-----Original Message-----
From: coreaudio-api-bounces+gibsond=email@hidden [mailto:coreaudio-api-bounces+gibsond=email@hidden] On Behalf Of Darrell Gibson
Sent: 08 June 2009 21:01
To: Doug Wyatt
Cc:
Subject: RE: Synchronizing Multiple AUGraph's
Doug,
Sorry, I should clarify. I want to synchronise the audio, not the clocks (I'm just using the clock as an indicator and using this I assumed the audio is out of sync). Essentially each AUGraph is a separate track of my audio output. The sources of each track is either a file or a live feed from a mic. When I start all the graphs I want to know that that the samples from the files is are all synchronised (ie sample 0's presented to the mixer together, sample 1's together, sample 2's, etc.). Similarly when the track is being used to record audio from the mic I want the recorded samples to the match-up with the audio on the other tracks.
If the CAClocks can not be synchronised how can I check the audio content is all started at the same time? Can I get a timestamp for each sample from the file player. If the files players in the separate graphs are not started at the same time, how can I schedule the players (or recorders) to all start together when in separate AUGraphs?
I hope this clarifies what I'm trying to do and the problem I'm trying to solve. Thanks for any pointers.
Darrell.
________________________________________
From: Doug Wyatt [email@hidden]
Sent: 08 June 2009 18:15
To: Darrell Gibson
Cc: email@hidden
Subject: Re: Synchronizing Multiple AUGraph's
Well, this is a pretty broad question. Everything depends on what it is you're trying to synchronize and where you are deriving your idea of time.
Unfortunately there is no way to synchronize two CAClocks. Is there a reason you couldn't just have one of them?
Doug
On Jun 8, 2009, at 10:08 , Darrell Gibson wrote:
> Doug,
>
> Thanks for the reply. Yes they are both running on the same device
> (an aggregate device, but I future I'd hope to have separate input and
> output devices). I start the two graphs one after the other with the
> AUGraphStart and also start the clock for each graph with CAClockStart
> (I assume this is what you mean by the timestamp). The clock tells me
> I have a delay between the two graphs (typically 13 ms). How then do
> I delay the leading graph to sychronise with a lagging graph? Sorry
> if this is a silly question. Your help is much appreciated.
>
> Darrell.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
This email sent to email@hidden
BU - the UK's Number One New University
The Guardian University Guide 2009 & 2010
This email is intended only for the person to whom it is addressed and may contain confidential information. If you have received this email in error, please notify the sender and delete this email, which must not be copied, distributed or disclosed to any other person.
Any views or opinions presented are solely those of the author and do not necessarily represent those of Bournemouth University or its subsidiary companies. Nor can any contract be formed on behalf of the University or its subsidiary companies via email.
_______________________________________________
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