• 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: Marc Vaillant <email@hidden>
  • Date: Wed, 14 Jan 2009 14:48:43 -0500
  • Mail-followup-to: John Michael Zorko <email@hidden>, Hamish Allan <email@hidden>, email@hidden

On Wed, Jan 14, 2009 at 08:14:17AM -0800, John Michael Zorko wrote:
>
> Hamish,
>
>>> While NSURLConnection is great, its
>>> caching behavior is exactly what I _didn't_ want (esp. when dealing
>>> with
>>> streams of indeterminate length)
>>
>> This is what I don't understand. When you're streaming audio of
>> indeterminate length, you're always consuming it as fast as the server
>> produces it, right?
>
> Of course not.  As an example, the server could deliver 2 megabytes in
> just a few seconds, yet that 2 megabytes might represent 2 minutes or
> more of MP3 audio.  If I only have a few audio buffers to hold the audio
> i'm going to decode and play, I don't want what's left of that 2
> megabytes consuming memory.
>
> I also don't see why this is a big deal -- CFReadStream works better for
> this app that NSURLConnection did.  It's certainly nothing against
> NSURLConnection, really.  CFReadStream allows me to read what I want, as
> much (or as little) as I want, when I want, and because I control the
> amount of data I read, i'm more in control of memory usage, and that
> works better in my audio streaming app on the iPhone.

I'm not a crazy lover of NSURLConnection or anything, but you may be
able to control download rate with NSURLConnection.  Just did a
class-dump on Foundation and there's an unpublished NSURLConnection
category (among other unpublished NSURLConnection APIs) that contains
the methods _suspendLoading and _resumeLoading.  Haven't tried those
methods but they might make NSURLConnection more usable for this issue.

Marc
 _______________________________________________
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: 
 >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>)
 >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>)

  • Prev by Date: Re: Streaming using coreaudio
  • Next by Date: Apple Loops Utility Question
  • Previous by thread: Re: Streaming using coreaudio
  • Next by thread: Re: Streaming using coreaudio
  • Index(es):
    • Date
    • Thread