• 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: Fri, 25 Jul 2008 16:46:09 -0700


On 25 Jul '08, at 2:34 PM, Erik Aigner wrote:

I receive an audio stream via NSURLConnection, and use NSSound to play back the received data.
Everytime new audio data arrives i append it to the NSData buffer. Once i reach a buffer limit, i start playing back with NSSound. The problem with this is, it only plays as long as the buffer was the time i created the NSSound object with initWithData:bufferData.

That's a really creative idea, but I can see why it wouldn't work (NSSound probably copies the data buffer, so no changes you make after starting will have any effect.)


Is there an EASY! way to solve this Problem?
(QTMovie doesn't work in this case btw)

If it's being streamed over HTTP, you can use QTMovie. Otherwise, you have to roll your own solution using NSURLConnection + AudioFileStream + AudioQueue. It's definitely not easy :-(


It would be nice if Apple could put out some sample code showing how to do this, since people keep asking about it. I have my own code, but it's not well-factored enough to give out standalone.

—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: 
 >Audio Streaming (From: Erik Aigner <email@hidden>)

  • Prev by Date: Audio Streaming
  • Next by Date: Re: Word synchronization of multiple PowerMACs audio outputs
  • Previous by thread: Audio Streaming
  • Next by thread: Re: Audio Streaming
  • Index(es):
    • Date
    • Thread