• 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
AudioToolbox: shift playback position
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AudioToolbox: shift playback position


  • Subject: AudioToolbox: shift playback position
  • From: Sergey Shapovalov <email@hidden>
  • Date: Mon, 30 Mar 2009 16:55:45 +0400

Hi all.

I'm working on an audio recording / playback application for iPhone, and use Apple's sample project SpeakHere as a starting point. Everything works all right; however, there's just one thing I can't figure out how to do.

While playback, I want to be able to pause playing (via AudioQueuePause), then move to another time moment in the audio record, and resume playback from the new position (via AudioQueueStart). The problem is that I don't understand how to move to a new position.

AudioQueueStart accepts a pointer to AudioTimeStamp as the second parameter. However, when I manually set it up like this:
AudioTimeStamp ats;
ats.mSampleTime = seconds * audioPlayer.audioFormat.mSampleRate;
and pass it to AudioQueueStart, the playback resumes at the position where it was stopped, not at the specified time moment.

Am I doing something wrong? Does anybody know a way how to set playback position properly?

Best regards,
Sergey Shapovalov.
 _______________________________________________
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: AudioToolbox: shift playback position
      • From: james mccartney <email@hidden>
  • Prev by Date: iPhone Audio Woes
  • Next by Date: CFBundle on a carbon AU
  • Previous by thread: Re: iPhone Audio Woes
  • Next by thread: Re: AudioToolbox: shift playback position
  • Index(es):
    • Date
    • Thread