• 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: Tue, 13 Jan 2009 14:22:12 -0800


Hamish,

Oops, I misstated the thread issue (likely got it confused with another issue I had), thanks for pointing that out :-)

NSURLConncetion is a fine
class and all, very easy to use and a truly upstanding citizen in the Cocoa
world, but it's not the best choice for downloading data when you don't know
how large the data is (so it ends up using a lot more memory),

If you don't consume the data it provides you, more will keep building up; but I've never found this a problem for streaming audio.

... but this is exactly why it's a bad candidate for streaming audio, imho. If NSURLConnection is reading as fast as it can (and caching all that it's read until I consume it), and I can only consume it at a certain rate (say, for a 128K MP3 stream), NSURLConnection's ease of use ends up costing more than one might expect (and for low-memory platforms like the iPhone, quite possibly more than it's worth -- the iPhone OS kept sending my app memory warnings when I tried to stream a long-ish piece of audio). I found it much better for my purposes to control how much I read from the network using the lower level C APIs, and count on the server to deliver the bytes I need in a timely manner when I ask for them (a job that servers are designed to do, anyway).


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>)

  • Prev by Date: Re: Streaming using coreaudio
  • Next by Date: Audio Playback Latency
  • Previous by thread: Re: Streaming using coreaudio
  • Next by thread: Re: Streaming using coreaudio
  • Index(es):
    • Date
    • Thread