views:

220

answers:

3

I'm looking for how to play back audio streams in these formats:

  • MP3
  • Ogg / Vorbis
  • WMA over MMS/ASF
  • AAC / AAC+

target is the mac and iPhone. Maybe there is an open source library that I could look at, to understand how it works, and then port it to the cocoa frameworks somehow.

A: 

I'm not sure about iPhone, but gstreamer is pretty portable.

e8johan
A: 

Have you looked at OpenAL or Ogg? I haven't used either personally but it's a good starting point.

wheaties
OpenAL is not a format; it is an API for 3D audio.
Nick Toumpelis
who said it was?
wheaties
+1  A: 

I'd take a look at FFmpeg. It's the most widely used opensource codec library and can be compiled for the iPhone. It has RTSP support (Microsoft deprecated MMS streams in 2003 and most current mms:// streams are actually just RTSP.

You don't actually need to port C/C++ libraries to Cocoa to be able to use them with Cocoa/Objective-C. You can use C libraries directly and C++ ones with Objective-C++ or using a C wrapper.

Or are you worrying about the license? Many parts of FFmpeg are LGPL and can be used from proprietary applications.

Adrian