Old thread, but useful info. 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. So to get the corresponding mach_time of the first sample in the callback (mSampleTime) you need to subtract (inNumberFrames * samplesToTicks) from mHostTime.
On Wed, Oct 22, 2014 at 1:45 PM, Paul Davis <[email protected]> wrote: > > > On Wed, Oct 22, 2014 at 4:33 PM, Dave O'Neill <[email protected]> wrote: > >> Ok thanks, that makes sense. If it's reset to zero at any point than it >> must refer to the first sample. But I'm still confused about the >> relationship of .mHostTime. It seems to be set to a future time that >> corresponds to the NEXT callback time, this is particularly confusing when >> trying to put a timestamp to a sample on an input callback (remoteIO mic >> input). You would think that .mHostTime would be tied to .mSampleTime and >> that that time would be in the past for input samples. >> > > as i mentioned, i could find nothing anywhere that defined these fields in > a way that allowed me, as a host developer, to set them according to some > thing that is well-understood. so much so that I do not even set mHostTime > at all. if you find anything that usefully defines these fields, please let > me know. >
_______________________________________________ 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]
