• 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
How to calculate the proper frame (in order to mean a particular time)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to calculate the proper frame (in order to mean a particular time)


  • Subject: How to calculate the proper frame (in order to mean a particular time)
  • From: Felipe Baytelman <email@hidden>
  • Date: Sat, 31 Dec 2005 20:52:20 -0300

Hi everybody... again.

I've managed to start playing a file again with AUFilePlayer.
Now I need to master the ScheduledFileRegion property.

Let's say I have an audiounit called fileAU, and I want to play from 10.0 seconds.
How can I transform it to frames?
So I can use it in:
playRegion.mTimeStamp.mFlags = kAudioTimeStampSampleTimeValid;
playRegion.mTimeStamp.mSampleTime = 0;
playRegion.mCompletionProc = NULL;
playRegion.mCompletionProcUserData = NULL;
playRegion.mAudioFile = audioFile;
playRegion.mLoopCount = 0;
playRegion.mStartFrame = thatFRAME; // <------- HERE
playRegion.mFramesToPlay = UInt32(-1);
AudioUnitSetProperty(fileAU, kAudioUnitProperty_ScheduledFileRegion, ...

I also have the CAStreamBasicDescription fileFormat, but I don't know how to use it...


Thanks!

        Felipe Bruno Baytelman P.

          Baytex Software

    email@hidden   http://www.baytex.net   (+56 8) 249 62 41


_______________________________________________ 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: How to calculate the proper frame (in order to mean a particular time)
      • From: Felipe Baytelman <email@hidden>
  • Prev by Date: AUAudioFilePlayer silent after setting playback position
  • Next by Date: Re: How to calculate the proper frame (in order to mean a particular time)
  • Previous by thread: AUAudioFilePlayer silent after setting playback position
  • Next by thread: Re: How to calculate the proper frame (in order to mean a particular time)
  • Index(es):
    • Date
    • Thread