RemoteIO timestamp alignment (input vs. output)
RemoteIO timestamp alignment (input vs. output)
- Subject: RemoteIO timestamp alignment (input vs. output)
- From: jhno <email@hidden>
- Date: Sun, 26 Mar 2017 11:39:21 -0500
I am seeing problems on iOS where the input and output timestamps are consistently out of alignment.
The output timestamp should be the real HostTime that the output reaches the speakers, yes? And the input HostTime should be the HostTime that the input reaches the mic?
To test this, I tried writing a single full-amplitude sample every 44100 samples, printing the timestamp passed in to the output callback, TimeStamp->mHostTime, plus the frame offset into the vector.
Meanwhile the input callback listens for samples that exceed a peak theshold. When the peak occurs, I print TimeStamp->mHostTime plus the frame offset into the vector.
The input timestamp is consistently late, by 30-40ms. The lateness changes when I try different vector sizes, but stays consistent within a few milliseconds once audio is started.
Any idea what could be causing this? Am I using the timestamps incorrectly?
I need to precisely correlate input and output times for a recording app.
Thanks!
jhno
_______________________________________________
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