Re: AudioTimeStamp in AURenderCallback
Re: AudioTimeStamp in AURenderCallback
- Subject: Re: AudioTimeStamp in AURenderCallback
- From: Dan Klingler <email@hidden>
- Date: Sat, 11 Apr 2015 17:31:04 -0700
> 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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden