Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Time Stamps across different busses/through AUConverters



Working on synchronization between different inputs to an AUStereoMixer:

Each input buss on the mixer has an AUConverter attached, and the render call is on the input of the AUConverter.
The time stamp behavior I am observing at the render callback is somewhat odd:


===

Sometimes, even when the sample rates match across the entire AUGraph (the streams are all consistent), the render callback on the second buss will be called after the first, but the time stamp will be earlier:

First buss render callback called: timeStamp = 472 samples (arbitrary)
-then-
Second buss render callback called: timeStamp = 0 samples

This does not happen all the time. Most of the time it is either the same as the first buss or one buffer later (give or take). Under what circumstances would this be happening?

===

To make matters a little more complex, if one of the AUConverter's input sample rates is different (i.e. there is some SR conversion going on into the mixer), the time stamps seems to not really matter at all:

First buss render callback called: timeStamp = 77316 samples (arbitrary)
-then-
Second buss (with SR conversion happening) render callback called: timeStamp = 0 samples


They then increment accordingly to the buffer size (~256, 512, whatever), but their start times are totally incongruent.

===

What I'd like to be able to do is synchronize the playback of all these inputs, even if the sample rates are different. However, there doesn't seem to be any consistency I can reference to make the inputs work together.
Can I not trust the timeStamp? It seems to be the only way to really confirm that things will show up at the output AU at the same time, but if there's no common reference, I can't seem to do it!


Thanks for any guidance on this.

Ev
Technical Knowledge Officer
Head Programmer/Designer
Audiofile Engineering

http://www.audiofile-engineering.com/

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/coreaudio-api/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.