• 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: Rick Mann <email@hidden>
  • Date: Mon, 9 Nov 2009 13:34:48 -0800


On Nov 9, 2009, at 10:11:08, Doug Wyatt wrote:

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.

So, I can dispose of the buffer passed to me in the callback, and allocate a new one to enqueue there? That's good to know. Thanks.


--
Rick


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

  • Prev by Date: Re: AudioUnit metering seems to be broken in generic views
  • Next by Date: Re: One Cocoa view for multiple AUs?
  • Previous by thread: Re: Passing parsed packets from Audio File Stream Services to Audio Queue
  • Next by thread: Converting audio file data to Float32
  • Index(es):
    • Date
    • Thread