• 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: Audio Streaming
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Audio Streaming


  • Subject: Re: Audio Streaming
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 28 Jul 2008 20:55:55 -0700


On 28 Jul '08, at 12:40 AM, Marco Papa wrote:

 If you do not set up enough audio buffers you end up locking up the UI while new packets are waiting for available audio buffers (which get recycled after being played). Even using POSIX thread mutex + condition signals (which are used in the Xcode samples) does not completely fix the issue. You end up increasing the number of audio queue buffers until you find enough of them able to sustain up to 192K of streaming audio, with no hiccups to the UI.

I don't understand — I haven't run into such an issue. The main thread never needs to block waiting for anything in my app. The number of audio buffers is just a trade-off between latency and robustness — too many and the playback is delayed, too few and you can get audio dropouts if the data stream gets blocked for a few seconds.

And these are just some of the issues you'll face. The rest involve handling streams that do HTTP redirects (301 or 302) , authentication (401)  and of course streams that are dead (no HTTP response or 404).

Um, are you using raw CFStream calls to implement the HTTP protocol yourself? That's not a good approach; NSURLConnection handles most of these cases for you pretty easily.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: 
 >Re: Audio Streaming (From: "Marco Papa" <email@hidden>)

  • Prev by Date: Re: AudioConverter's algorithm vs complexity vs quality
  • Next by Date: Re: AudioQueue newbie : Handling Forward , Rewind , etc..,
  • Previous by thread: Re: Audio Streaming
  • Next by thread: Wrap .aac into .m4a container
  • Index(es):
    • Date
    • Thread