• 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
AudioQueue: How to change start time?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AudioQueue: How to change start time?


  • Subject: AudioQueue: How to change start time?
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 20 Feb 2008 09:20:49 -0800

I'm calling AudioQueuePlay( ) with a timestamp parameter, to schedule playback at a specific future time. However, in some cases I need to change that time before playback begins, in response to user actions.

If I just call AudioQueuePlay again, with a different timestamp, it has no effect. Calling AudioQueuePause first doesn't help. The only way I've found to make this work is to call AudioQueueStop before AudioQueuePlay. Unfortunately, this has the side effect of resetting the queue and discarding buffers — and since the audio data is coming from an incoming network stream, that's bad.

Is there any way of accomplishing this? Right now I think I need to do one of the following:
(1) Don't call AudioQueuePlay until a second or so before the playback time. (I still want to use the timestamp, to get sample-accurate timing, but this way there'd be a much smaller time window where I can no longer alter the time.)
(2) Somehow save the queue's buffers before calling AudioQueueStop, and then put them back again afterwards. I'm not sure how to do this.


Any advice or other workarounds?

—Jens _______________________________________________
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: AudioQueue: How to change start time?
      • From: William Stewart <email@hidden>
  • Prev by Date: AU's built on Leopard, running on Tiger
  • Next by Date: Re: AU Lab not seeing my plugin when I start it from the command line
  • Previous by thread: DreamCheeky USB Piano Keyboard
  • Next by thread: Re: AudioQueue: How to change start time?
  • Index(es):
    • Date
    • Thread