>  I have measured the relationship between mHostTime and mSampleTime (on iOS), 
> and it appears that for a timestamp in the render callback mHostTime 
> represents the machine time of the last sample in the callback. 


How did you measure this?

From the HAL’s perspective:
mHostTime for output represents the time at which the device will consume the 
first sample in the callback buffer.
mHostTime for input represents the time at which the device produced the first 
sample in the callback buffer.

If there is latency from when the device “consumes" the samples to when the 
signal physically appears at the speaker, this will be reflected in the device 
and stream latency properties. That way, an application can calculate the 
precise host time that an output sample will hit the speaker, or what host time 
an input sample had hit the microphone. On iOS, I think AVAudioSession can get 
you this same info.

Dan
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to