OpenAL, Fmod, Miles, PortAudio. Is there anything else?

Member
Posts: 257
Joined: 2004.06
Post: #1
At work the other day, we were doing a post-mortem on our latest project and someone suggested that we should start looking at middleware as a way of saving time and not reinventing the wheel so much. One of the topics that came up was how our use of OpenAL was really just a thin layer over the sound system and that we should probably get something more robust. So I started some poking around for audio frameworks and libraries and have so far found FMod, Miles, and PortAudio.

So basically my question is, are there any other cross-platform audio libraries that I should take a look at as well that are suitable for commercial software?

The brains and fingers behind Malarkey Software (plus caretaker of the world's two brattiest felines).
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
What's wrong with OpenAL? It's probably higher-level than the others...
Quote this message in a reply
Member
Posts: 749
Joined: 2003.01
Post: #3
There's SDL Mixer, which is LGPL.

It works fine, but it doesn't do pitch shifts or 3d effects such as doppler.

©h€ck øut µy stuƒƒ åt ragdollsoft.com
New game in development Rubber Ninjas - Mac Games Downloads
Quote this message in a reply
Member
Posts: 257
Joined: 2004.06
Post: #4
OneSadCookie Wrote:What's wrong with OpenAL? It's probably higher-level than the others...

Dunno, but the musician / programmer I work with has some sort of dislike for it so I'm just putting together a list of alternatives to research.

The brains and fingers behind Malarkey Software (plus caretaker of the world's two brattiest felines).
Quote this message in a reply
Member
Posts: 446
Joined: 2002.09
Post: #5
There's also irrKlang, but I've never tried it personally. Last time I checked it didn't have a flat C API (deal breaker for me) but feature wise it looks decent.

Nothing beats FMOD Ex if you ask me - I'd dump OpenAL in a heartbeat if they released an iPhone target.
Quote this message in a reply
Member
Posts: 241
Joined: 2008.07
Post: #6
Unfortunately, the iPhone doesn't have FMOD support as of yet. Also, FMOD is freaking expensive commercially.
Quote this message in a reply
Nibbie
Posts: 4
Joined: 2008.12
Post: #7
Malarkey Wrote:Dunno, but the musician / programmer I work with has some sort of dislike for it so I'm just putting together a list of alternatives to research.

I'm not surprised. OpenAL is great for doing immersive audio effects in a game. But the API, at least what I know of it, does not give musicians the kind of knobs they are used to twisting.

Perhaps you should prioritize sound effect or musical score and make a decision from there?
Quote this message in a reply
Member
Posts: 446
Joined: 2002.09
Post: #8
bmantzey Wrote:Unfortunately, the iPhone doesn't have FMOD support as of yet. Also, FMOD is freaking expensive commercially.
I forgot about this thread till OrangeTide posted...

An iPhone build of FMOD Ex has been available for for a couple weeks now. It hasn't hit "stable" status yet and isn't entirely optimized, but the iPhone license falls in the budget/casual category and looks pretty reasonable.

Apple has also introduced some higher level APIs in the 2.2 SDK that make dealing with music much easier, but if you need dynamic/interactive music or advanced 3D features then FMOD is still the way to go IMHO.
Quote this message in a reply
Member
Posts: 260
Joined: 2005.05
Post: #9
I am looking into exactly these questions, and my list is pretty much what has been mentioned:

OpenAL
PortAudio
libsndfile
irrKlang
SDL
FMOD
QuickTime

My current solution uses Sound Manager, but Apple is dropping that, and it is not portable. (My code is really old; I recently deleted the old Sound Driver compatibility code as well as workarounds for bugs fixed long ago.)

Using Core Audio seems like a dead end, non-portable and more complicated than SM.

QuickTime is semi-portable, but I don't trust it to last, and limiting oneself to Mac+Win is not enough improvement.

New Apple APIs, is that for iPhone only? Mac? Anything else? Most likely unportable, I suppose.

PortAudio looks fairly nice, documentation is pityful but it installs and runs nicely so I am sore it works. Static library, good, no extra installs by the user. But, it has no support for loading sound data from files, and no demos in that direction either. libsndfile was mentioned as a solution for that, but I don't know more about it.

I fear that SDL and OpenAL will complicate the installation procedure. Since I am aiming at small games, I don't want any installation procedure at all, the game should run right out of the box. And an iPhone port should be easy.

I have used FMOD in the past and my experience of that was highly positive. Could be worth trying again.

Are there any other options? Right now, it seems to me that PortAudio complemented with an audio loading module would be pretty good, but it will require some extra work. Uncompressed WAV or AIFF sound shouldn't be hard to load. But on the other hand, we rather want to play mp3 or ogg these days.
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #10
Ingemar, you're back, great to see you here again! Grin

I've heard some good things about FMOD.

I'm only doing cross platform between Mac and iPhone right now so I haven't really thought about other stuff. As you may know OpenAL is standard installed on Tiger and higher Macs. I use OpenAL for sound effects and lately started using Audio Queues for music.

Hopefully someone else can chime in here with some more thoughts.
Quote this message in a reply
Member
Posts: 260
Joined: 2005.05
Post: #11
AnotherJake Wrote:Ingemar, you're back, great to see you here again! Grin
Thanks! Smile
Quote:I've heard some good things about FMOD.

I'm only doing cross platform between Mac and iPhone right now so I haven't really thought about other stuff. As you may know OpenAL is standard installed on Tiger and higher Macs. I use OpenAL for sound effects and lately started using Audio Queues for music.

Hopefully someone else can chime in here with some more thoughts.
I must keep the door open to MS too, and I'd like to include Linux as well. OpenAL, FMOD and SDL are all possible from that point of view.

Would Ogg Vorbis be an option?
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #12
Yes, Ogg Vorbis for sure! Heck, the only reason I'm using Audio Queues right now is because it is x-platform with iPhone. Otherwise I'd be using Ogg Vorbis myself.
Quote this message in a reply
Member
Posts: 260
Joined: 2005.05
Post: #13
AnotherJake Wrote:Yes, Ogg Vorbis for sure! Heck, the only reason I'm using Audio Queues right now is because it is x-platform with iPhone. Otherwise I'd be using Ogg Vorbis myself.
Do you mean that Ogg Vorbis doesn't work with iPhone (yet)?
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #14
I'm sure it probably does, but unfortunately it would be a bad direction to take, since on iPhone you want to use the built-in hardware to decode compressed audio at high-efficiency, and only Apple API stuff can do that AFAIK. Otherwise it has to be done on the CPU, which clearly isn't ideal in such a limited environment.

Honestly though, I haven't looked into Ogg on iPhone, since I've been assuming only Apple API audio technologies get to run through the specialized audio decompression hardware. If you find something else about Ogg being able to do that now, please let us know!

... I should add that I'm only talking about compressed formats for things like background music. OpenAL is still preferred on iPhone for short sounds in uncompressed formats. If Ogg works on iPhone, that would be suitable for loading into your OpenAL buffers, although short clips don't usually need compression anyway, so...
Quote this message in a reply
Member
Posts: 446
Joined: 2002.09
Post: #15
As AnotherJake pointed out there's no hardware support for Ogg on the iPhone but it's just another file format so you can import the libraries and decode it yourself if you really wanted to. You probably don't want to do that however as there's better things to do with the CPU time. Also note that OpenAL on the iPhone lacks compressed buffer extensions so it's pretty pointless to use compressed audio for sound effects since you gotta decompress the data in full. You might save some flash drive space, but that's about it.

I'm still keeping an eye on FMOD for future iPhone projects, and it would be my first choice for cross platform code but AFAICT it still decodes everything in software on the iPhone so it may not be ideal for every situation. For now my iPhone audio is handled with some wrappers around OpenAL for effects and AVAudioPlayer for music, which lets you take advantage of hardware decompression for MP3 or AAC (but only one track at a time). You can get multiple AVAudioPlayers playing if your secondary audio is uncompressed or IMA4, which is better than nothing. AVAudioPlayer is dead simple to use but it isn't at all cross platform.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Fmod & bus error barbeirovsk 0 1,957 May 8, 2009 02:51 PM
Last Post: barbeirovsk
  fmod on tiger (10.4.11) AcidZombie24 2 2,726 Sep 10, 2008 01:05 PM
Last Post: AcidZombie24
  FMOD Questions kodex 8 4,742 Apr 27, 2005 08:13 PM
Last Post: DanLab