• 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
Re: Passing parsed packets from Audio File Stream Services to Audio Queue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing parsed packets from Audio File Stream Services to Audio Queue


  • Subject: Re: Passing parsed packets from Audio File Stream Services to Audio Queue
  • From: Doug Wyatt <email@hidden>
  • Date: Mon, 9 Nov 2009 10:11:08 -0800

On Nov 8, 2009, at 22:26 , Rick Mann wrote:
When streaming, how do I determine an appropriate Audio Buffer Size?

It seems like the parser callback provides the data for a direct call to AudioQueueEnqueueBuffer(), but as I understand it, I'm not supposed to call that until the Audio Queue calls me back. Which suggests I have to buffer the data in the first callback and make it available in the second.

I don't have good answers for your other questions right now, but I can speak to this. With AudioQueue, you are free to use any strategy you like for allocating, scheduling and disposing of buffers. It turns out to be simple and convenient when playing from a file to have a small pool of buffers, and then daisy-chain, from the buffer completion callback, a read from the file, followed by re-enqueuing the buffer.


You could however use a completely different strategy, e.g. allocate and enqueue buffers as data arrives from the network, and dispose the buffers when they are completed.

hth,
Doug

_______________________________________________
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: Passing parsed packets from Audio File Stream Services to Audio Queue
      • From: Rick Mann <email@hidden>
References: 
 >Passing parsed packets from Audio File Stream Services to Audio Queue (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Issues in ExtAudioFileSeek and ExtAudioFileTell
  • Next by Date: Re: au property listeners and RT
  • Previous by thread: Passing parsed packets from Audio File Stream Services to Audio Queue
  • Next by thread: Re: Passing parsed packets from Audio File Stream Services to Audio Queue
  • Index(es):
    • Date
    • Thread