View Full Version : Sound Libraries
filharvey
11-13-2006, 10:36 AM
What sound libraries are people using? FMOD or something else? What file formats? MP3, OGG? The base code for the project is all c / c++.
Thanks for the help.
Phil
Sybixsus
11-13-2006, 10:43 AM
I plan to use this : http://www.ambiera.com/irrklang/
Unfortunately, there's no GCC build yet, so I can't test it.
>What sound libraries are people using?
The popular ones are fmod, bass and audiere.
>What file formats?
Wav, ogg, tracker formats (mod, xm, s3m etc) and maybe midi.
>MP3, OGG?
Ogg.
Applewood
11-13-2006, 11:49 AM
fmod is a decent price for the pc version. Indies get it for a sensible price.
However I'm not best pleased with Brett atm as he tried to bilk me for four grand for the 360 build. It took me 3 days to roll my own instead.
If your platform has a mixer built in, it's really pretty simple to do. I've still got to add tracker support, but the file format looks pretty simple. I'll do it when I need it
Philippe
11-13-2006, 12:11 PM
ooh, I didn't know about IrrKlang! Hope they'll develop a Mac version.
PTK has the KSound library included, but it's also available as a cheap standalone lib (http://www.phelios.com/ptk/orderptk.html). It's a bit limited, but it's simple and works.
lennard
11-13-2006, 01:41 PM
I'm now using the Audiere library to play Ogg files.
Sybixsus
01-21-2007, 03:47 PM
I'm digging this back up because although I've now wrapped irrKlang for Blitzmax, my demo with it seems to just flat out not run half the time, almost as though it's having trouble loading the file rather than playing it. Very odd.
Anyway, I've been looking at Bass and FMod. Both look great, but the prices are massive. I mean I paid $250 for a DX9 3D Engine with an insane featureset, which is both stable and blisteringly fast, and has a fantastic physics engine properly integrated into the renderer. And I'm supposed to pay $1200 or $3000 for a sound engine? Even if I had the money to spare, that doesn't seem right. I'll give audio credit for being as valuable as graphics and physics ( unlikely, but maybe ) but I can't really justify it being several orders of magnitude more important.
How do you guys use these libs? Both seem very strict on the shareware licenses. FMod mentions price of around $10, no company, no employees. Bass seems to forbid any non-exclusive retail deals ( still waiting to hear back, but that was the impression I got from the initial reply. )
Perhaps I'm wrong, but I supposed that most developers had the odd boxed version on shelves in some territory. Are you guys really paying $1.2k or $3k for the commercial licenses of these? I don't really like the API of Audiere and especially not OpenAL, so I'm not really giving myself a lot of options here, I suppose.
zoombapup
01-21-2007, 04:48 PM
Which 3D engine?
Anyway, FMOD is nowhere near 3k for the indie license. Is that the one youre on about?
Sybixsus
01-21-2007, 05:38 PM
Which 3D engine?
TrueVision3D.
Anyway, FMOD is nowhere near 3k for the indie license. Is that the one youre on about?
No, I'm talking about the fact that I don't see how anyone but the very least successful indies actually qualify for an Indie License.
etiumsoft
01-21-2007, 06:05 PM
why not just use the directx? Every engine such as blitz or 3DGS all have sound supported, I think that's enough for indie.
Sybixsus
01-21-2007, 06:20 PM
why not just use the directx? Every engine such as blitz or 3DGS all have sound supported, I think that's enough for indie.
Blitz has no 3d sound support. That's a bare minimum for me, can't manage without it. Pretty sure Blitz is not using DirectX for it either, come to that. It's not particularly dependable anyway.
Applewood
01-22-2007, 01:27 AM
I'd recommend writing your own using direct sound or whatever. Just to reiterate the bones of a previous post:
I have the cheap shareware license for fmod (for pocketpc) and found Brett to be pleasant and helpful with support even though I hadn't paid him much.
However, when I inquired if the indie license extended to the 360 for XBLA games, he said no and I'd need to pay the full fee of four grand. I about fell of my chair. Fair enough the 360 isn't a shareware platform, but four grand ?!?
Three days later and I had a reuseable sound engine that runs using directsound on PC and XAudio on 360. Wrote it myself and I wasn't even rushing. This stuff isn't rocket-science and the fmod boys are, imo, overplaying their cards.
If you want music, there's plenty of source about for playing back tracker files. Or just use WMA.
Bad Sector
01-22-2007, 04:00 AM
This stuff isn't rocket-science and the fmod boys are, imo, overplaying their cards.
Well, actually FMOD started as a module player library (thus the name) and -from what the site says- it's a very fast one. When i had a P200MMX the standalone FMOD player was outperforming most other module players. Back then, the net speed was also slow with many people having slow modem connections. If you wanted quality music and small download sizes, modules was the way to go and FMOD was your best option.
However, today a tracker's speed doesn't matter that much. Even my old P2 at 333MHz is able to play every module i want, even those my previous computer had problems with. Today very few people have even a P3.
FMOD introduced some new stuff, like mp3, ogg, wma and other fileformat support. However it was and mainly is a module player and it's playback routines are highly optimized. Today i think that the FMOD developer(s?) focus more on handheld devices where their code shines than on power beasts, like PCs and consoles. In such devices, it may actually take you quite some time to write a good module (or mp3/ogg) player.
Writing an interface to libvorbis, libogg, liboggfile and SDL was a matter for less than an hour for me. However, FMOD does a lot more than that and they charge your for all of them. Sure, you may use only a tiny subset of FMOD's features (personally i only used it at the past to playback module files and nothing else), but if that's the case then you're looking at the wrong tool :-).
OTOH, the price is very high ($6000 for the latest version). But then again, if you were FMOD's developer (i think it's only one guy) and you had one or two sales per year (such a library is not the most selling product anyway) and you had to make a living out of it, you would use a high price :->.
lakibuk
01-22-2007, 04:43 AM
FMOD is a lot cheaper for shareware developers, like a few hundred dollars for multi-titles. I am sure a few indiegamers use it.
Sybixsus
01-22-2007, 08:40 AM
Three days later and I had a reuseable sound engine that runs using directsound on PC and XAudio on 360. Wrote it myself and I wasn't even rushing.
That sounds encouraging, but I know from past experience that BlitzMax doesn't always play nice with third party stuff. I'll look into it, but I just have this feeling that it's going to involve C wrapper code, BMax glue functions, building structs in memory and passing pointers to them, unfolding the memory back into BMax structs.
FMOD is a lot cheaper for shareware developers, like a few hundred dollars for multi-titles. I am sure a few indiegamers use it.
Precisely my point, and precisely why I posted. I was hoping to get some tips on how they arranged the license, since both FMod and Bass seem to be too restrictive in their budget/shareware licenses for the way most ( even moderately ) successful shareware games work these days.
Anyway, I've written to Brett, and asked if he can structure a license based on gross income rather than focussing on sales channels. I would prefer a precise income point at which I owe him $3k, rather than the first retail deal ( which knowing my luck would be a one-off payment of $1k and I'm $2k out of pocket before I begin. ) Will see how that goes.
We are using Bass for our casual game. http://www.un4seen.com/ We have it intergrated with the Popcap framework. Havnt had any problems with it, runs great, sounds great, nice and small (100k or so for the bass.dll) and only 100 euros.
We looked at audiere before that http://audiere.sourceforge.net/
from the bass website:
Shareware license: 100 eu
The "shareware" license allows the usage of BASS in an unlimited number of your shareware products, which must sell for no more than 40 Euros each. If you're an individual making and selling your own software (and its price is within the limit), this is the license for you.
princec
01-23-2007, 05:25 AM
But what about Mac?
Cas :)
Bad Sector
01-23-2007, 06:15 AM
i said it many times before, but i'll say it again... MikMod (http://mikmod.raphnet.net/). It's even ported to Java (here i assume that "port" means rewrite). MikMod has some sound drivers too.
Mikmod is a module player and library supporting many formats, including mod, s3m, it, and xm. Originally a player for MS-DOS, MikMod has been ported to other platforms, such as Unix, Macintosh, BeOS, and Java(!!)
GolfHacker
01-23-2007, 07:51 AM
Writing an interface to libvorbis, libogg, liboggfile and SDL was a matter for less than an hour for me. However, FMOD does a lot more than that and they charge your for all of them. Sure, you may use only a tiny subset of FMOD's features (personally i only used it at the past to playback module files and nothing else), but if that's the case then you're looking at the wrong tool
I agree. Writing audio code is the easiest thing to program in a game. I wrote a very simple playback class for wav and ogg files using libogg, libvorbis, and OpenAL, and it took maybe 8 hours - tops. It handles looping, pause/resume, 3D sound, and volume control - all the basic playback features needed for a game. And it is cross-platform. And I can reuse this simple class in all my games.
There are a ton of tutorials/examples for how to do this on gamedev.net and other sites. I really can't see why you would want to spend anything on a third-party audio library.
lakibuk
01-23-2007, 08:12 AM
There are a ton of tutorials/examples for how to do this on gamedev.net and other sites. I really can't see why you would want to spend anything on a third-party audio library.
Maybe cause you don't want that the game crashes on every 2nd computer.
Bad Sector
01-23-2007, 08:24 AM
Maybe cause you don't want that the game crashes on every 2nd computer.
Learn how to code then.
princec
01-23-2007, 08:31 AM
Learn how to code then.
Flamebait ;) - but seriously - you'd need to tell that to the OpenAL developers, because unfortunately it's not quite stable enough to use reliably. As I discovered to my cost. Works great nearly all the time but the streaming APIs are plagued with crash bugs.
Cas :)
lakibuk
01-23-2007, 08:57 AM
Learn how to code then.
:p I'd rather concentrate on making a game than have to deal with this low level stuff.
Bad Sector
01-23-2007, 11:10 AM
:p I'd rather concentrate on making a game than have to deal with this low level stuff.
Learning how to write proper code is the most important thing you should learn before making a game (unless you use some premade tools, such as gamebuilder, rpg maker or similar stuff - although even if you use these, you'll only benefit if you know how to write good programs).
I would find it normal if you don't want to spend time on writing a sound engine and buying it from a 3rd party. Lots of people do it and they have a point, because it saves them time.
But i wouldn't find it normal (as i didn't above) to do it because you think that if you write it by yourself, it would be very unstable. Sound processing isn't that complex to write and every soundcard works in almost the same way since the DOS days, so the practices on writing proper sound code are simple, and well-known. It's easy to write a sound engine, but yes it requires some time, especially if you want to add some extra effects.
@princec:
Well i don't know what's going on with OpenAL, but i'm sure that it's on the "very complex sound stuff" side, where it's normal to have problems (given that the library only recently went out of being available only via CVS). Some games use it without problems though (Quake4 and FEAR i think are two), so your problems should be solvable.
GolfHacker
01-23-2007, 03:18 PM
Dirk Dashing uses OpenAL without any problems, that I'm aware of. But then again, I don't use any of the streaming APIs, so there could be issues with parts of the library I'm not using. But the standard playback and 3D audio components work just fine on Windows, Linux, and Mac.
(Besides, using streaming audio in performance-critical games is a bad idea anyway - if you're trying to get super-smooth animation, streaming audio is going to result in lots of little hiccups. Better to preload your audio before you play it.)
I want to reiterate that writing audio code isn't rocket science. There are plenty of good tutorials, and you can learn everything you need to know in an hour. Plus, there are plenty of working examples - just look at some open source games if you want to see what bug-free audio code looks like and how to certain APIs are used.
Another thing I want to point out is that most of the "low-level" audio APIs (SDL_Mixer, OpenAL, etc) already do nearly all of the work for you, so there really isn't anything truly low-level to deal with anymore - you can write a simple playback class in a few hours. Even doing 3D audio in OpenAL is pretty straightforward. So I'm not sure I accept the "saves time" argument for licensing an audio engine - the time it takes you to license the thing, install its SDK, learn its API, and write code to hook up to it, you could have easily written your own. And if you write a class to interface with the audio API, like most code I've seen, you only have to write the class once and can easily reuse it in other games.
I can understand using a third-party SDK to save development time, and I'm all for that. But as a cost-conscious indie, I have to look at where my money will give me the biggest return on investment. I would rather invest in a third-party library that's going to cut months off my development time (like a good graphics engine) versus an audio library that will only cut a few days off my schedule (at most).
There might be some developers that just don't want to write audio code, for whatever reason (seems intimidating, just don't care to learn, or whatever). If that's the real issue, then fine. But "saves time" - I don't buy that.
DanDanger
01-24-2007, 12:20 PM
HiHi!
Thought id put my tuppence in.
Keith Goes Painting (www.wolfysgames.com (http://www.wolfysgames.com)) uses openAL for all its audio, it plays wav files in 3D and streams ogg files from disk. I didnt have any probs with the audio stuff, nor did I notice any performance hit with the streaming stuff. And that is using the pure java ogg decoder "jogg".
Seems a great free library to use, I would heartily reccomend it to anyone.
Sybixsus
01-28-2007, 05:01 PM
Well I got my reply regarding FMod. According to Brett, if you have any retail distribution at all - even if you don't make a cent out of it - you're not indie or budget and you owe him $6k. Or $3k or whatever if you're using FMod 3, I guess.
So I'm back to wondering how you guys justify that kind of money or whether you just reject those small non-exclusive retail deals out of hand.
Bass is a bit more reasonable. At least they'll wait till I get the money before they want it, but that's about all.
Heh, I think I'm going back to irrKlang.
Nutter2000
01-31-2007, 01:32 AM
I started off wanting to use openAL but then discovered it crashed on AC'97 hardware as soon as I called the alcOpenDevice!
So have switched to FMod and found it pretty good.
I do think that the $6,000 per SKU is really expensive, prohibitively so in fact. I know he's put a lot of work into it and wants to see a return but even so!
If it was a $6k price for a specific version accross all platforms then it'd be a lot more reasonable.
His product though I guess *shrugs* :(
Much as I don't mind rolling my own sound library, it's takes time to do bug fixing and future feature enhancement that I don't really have as an indie developer, I'd rather farm it out to an "expert" and concentrate on getting a shipped product (easy for me to say having been bogged down on PBBGs for the past few years :rolleyes: ).
I haven't tried irrKlang, it seems quite straightforward though. How easy is it to use outside of the irrilicht framework?
vBulletin v3.6.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.