AudioTimeStamp and mRateScalar
AudioTimeStamp and mRateScalar
- Subject: AudioTimeStamp and mRateScalar
- From: Robert Martin <email@hidden>
- Date: Fri, 20 Jul 2012 10:50:02 -0400
When I fetch the current sample time using:
AudioUnitGetProperty(fileAU, kAudioUnitProperty_CurrentPlayTime, kAudioUnitScope_Global, 0, &ts, &size);
I notice that the mRateScalar field does not reflect the ratio of the fileAU's sample rate to nominal (44100 I guess). For example, if my AudioFilePlayer is playing audio recorded at 96K, mRateScalar is set to ~6.95 instead of the correct ~2.18. (The output unit and my interface are both set to 96K too).
To fix this, I calculate the ratio when I load the file, and multiply it by ts.mSampletime to get the correct sample time.
I just wonder if there's a way to get mRateScalar to work properly when getting kAudioUnitProperty_CurrentPlayTime...
Thanks,
-Rob
_______________________________________________
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