• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: mHostTime vs mSampleTime
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mHostTime vs mSampleTime


  • Subject: Re: mHostTime vs mSampleTime
  • From: Matthew Dzieciuch <email@hidden>
  • Date: Fri, 29 Nov 2013 11:03:43 -0800

On Nov 29, 2013, at 2:41, Eric Gorouben <email@hidden> wrote:Yes there are two clocks, the sample clock and the host clock. They run at different rates. CoreAudio will try to match those rates as best as possible (by adjusting the rateScalar.) It does a good job, but it takes a while ( a few buffers) to get the clocks synced up. After that, CoreAudio will just adjust the rateScalar as needed. There is no documentation of this as far as I know. It took some experimenting to figure it out.

Matt



> Isn't there a confusion? The host time is a time, and the unit is the "tick", while the sample time is a sample position, and the unit is the sample.
> A timestamp is composed of both a sample time (the sample position) and the host time (the ticks position associated with that sample time).
> Regards
> Eric
> Le 29 nov. 2013 à 00:35, Aran Mulholland <email@hidden> a écrit :
>
>> I have been looking at a third party library for core audio and have noticed that it does it's scheduling using host time rather than mSampleTime.
>>
>> In the past when playing with audio I have used the sample time given me by the render callback as the basis for scheduling. I figured that when playing with audio that the time stamp given by the render callback in samples is the source of truth as this is generated by the audio interface.
>>
>> Can the mHostTime and the mSample time drift from each other? Am I correct in assuming that they are running on different clocks?
>>
>> Should I continue to use the render callbacks mSampleTime as my source of truth, does it matter which I choose (mSampleTime or mHostTime)?
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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


 _______________________________________________
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


  • Follow-Ups:
    • Re: mHostTime vs mSampleTime
      • From: Aran Mulholland <email@hidden>
References: 
 >mHostTime vs mSampleTime (From: Aran Mulholland <email@hidden>)
 >Re: mHostTime vs mSampleTime (From: Eric Gorouben <email@hidden>)

  • Prev by Date: Re: mHostTime vs mSampleTime
  • Next by Date: AudioOutputUnitStart memory barrier
  • Previous by thread: Re: mHostTime vs mSampleTime
  • Next by thread: Re: mHostTime vs mSampleTime
  • Index(es):
    • Date
    • Thread