Re: AudioTimeStamp.mRateScalar
Re: AudioTimeStamp.mRateScalar
- Subject: Re: AudioTimeStamp.mRateScalar
- From: Gregory Wieber <email@hidden>
- Date: Wed, 05 Jun 2013 23:27:57 -0700
It's late here and I'm not totally understanding your wording, but I believe the way mRateScalar works is that you multiply it by your nominal rate to get the actual hardware rate.
44100 * mRateScalar == actual hardware rate
On Wed, Jun 5, 2013 at 10:33 PM, Matthew Dzieciuch
<email@hidden> wrote:
I am wondering what this is?
When one calls:
AudioQueueGetCurrentTime( aqp.mQueue, aqtl, &ats, &tldq);
the third argument returns an AudioTimeStamp.
As far as I can tell
ats.mHostTime appears to be the host time when the
sample in ats.mSampleTime was played or recorded.
If I difference a time series of ats.mSampletimes and divide by a the difference time series ats.mHostTime, one would expect to get the actual sample rate. ( if I convert ats.mHostTime to seconds first).
The resulting timeseries is not constant, I am guessing because of random perturbations of the sample clock or host clock.
I was expecting that ats.mRateScalar would be related to this. It is not though. What gives? I can't find any documentation for AudioTimeStamp.mRateScalar other that the rather weak explanation that it is the ratio of the actual to the nominal sample rate. If it were, my calculation would agree with the mRateScalar output.
So what is AudioTimeStamp.mRateScalar really? Anybody got any ideas??
Matt
_______________________________________________
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