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

Re: Streaming using coreaudio


  • Subject: Re: Streaming using coreaudio
  • From: John Michael Zorko <email@hidden>
  • Date: Wed, 14 Jan 2009 07:00:55 -0800


Hamish,

Though the fault of no one, clarity seems to be the one thing missing from our conversation, so let me try again. While NSURLConnection is great, its' caching behavior is exactly what I _didn't_ want (esp. when dealing with streams of indeterminate length), and that's why I replaced it with CFReadStream in my iPhone app, which allowed me much more control of both the timing and the quantity of data I read from the server. The result is that my app uses far less memory, which is definitely a good thing on the iPhone :-)

Ah, sorry, I should have been clearer: the OP mentioned shoutcast, so
I assumed we were talking about a stream of indeterminate length
(expectedContentLength == -1), in which production and consumption
rates are necessarily equal.

For streaming finite length audio, it might be easier to download the
data into a file but start playing the file before the download is
finished. An unfinished and unpolished piece of code I wrote for this
purpose is included below; feel free to use this under a BSD license.

Regards,

John

Falling You - exploring the beauty of voice and sound
http://www.fallingyou.com


_______________________________________________ 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: Streaming using coreaudio
      • From: "Hamish Allan" <email@hidden>
References: 
 >Streaming using coreaudio (From: "Arnab Ganguly" <email@hidden>)
 >Re: Streaming using coreaudio (From: John Michael Zorko <email@hidden>)
 >Re: Streaming using coreaudio (From: Christopher Atlan <email@hidden>)
 >Re: Streaming using coreaudio (From: John Michael Zorko <email@hidden>)
 >Re: Streaming using coreaudio (From: "Hamish Allan" <email@hidden>)
 >Re: Streaming using coreaudio (From: John Michael Zorko <email@hidden>)
 >Re: Streaming using coreaudio (From: "Hamish Allan" <email@hidden>)

  • Prev by Date: FW: How to debug MIDI Plugin in Xcode
  • Next by Date: Re: Streaming using coreaudio
  • Previous by thread: Re: Streaming using coreaudio
  • Next by thread: Re: Streaming using coreaudio
  • Index(es):
    • Date
    • Thread