• 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
AudioTimeStamp and mRateScalar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Using AVPlayer to play MPMediaItem and add iPod EQ to the output
  • Next by Date: Re: Using AVPlayer to play MPMediaItem and add iPod EQ to the output
  • Previous by thread: Re: Selecting audio output devices
  • Next by thread: Audio Unit callbacks pause during audio route change (iOS 5.1)
  • Index(es):
    • Date
    • Thread