• 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: Aran Mulholland <email@hidden>
  • Date: Mon, 02 Dec 2013 10:04:25 +1100

I think I was responding to Matthews point more than Eric's. He said "but it takes a while ( a few buffers) to get the clocks synced up"

The answer I really wanted has been provided - "the audio sample clock is ALWAYS the clock to rely on".



On Sun, Dec 1, 2013 at 2:12 PM, Paul Davis <email@hidden> wrote:
i think you've missed eric's point. the two values provided have already been adjusted to reflect the same time. yes, the audio sample clock is ALWAYS the clock to rely on, but the "host time" given has already been computed to precisely match the sample time.



On Sat, Nov 30, 2013 at 9:56 PM, Aran Mulholland <email@hidden> wrote:
Would you say that mSampleTime is the "clock to rely on" as the source of truth in a music app?


On Sat, Nov 30, 2013 at 6:03 AM, Matthew Dzieciuch <email@hidden> wrote:

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


 _______________________________________________
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

  • Prev by Date: timepitchAU
  • Next by Date: Re: AudioServerPlugin : ASBD for clients (?)
  • Previous by thread: timepitchAU
  • Next by thread: counting specific audio units in audiograph
  • Index(es):
    • Date
    • Thread