views:

294

answers:

6

Hi,

does aybody know about an open source sound library in C++ or some other popular language that can be used in open source games for recreating sounds and especifically in car racing games to recreate engine sound?

Thanks

+1  A: 

I've only trivially poked around with it, but SDL is a very popular, cross-platform, C++ game dev library. It includes support for graphics, sound, input.

I also recall that it's very modular. That is, it's less of a framework and more of a library than some other solutions. Give it a look.

Magneus
+1  A: 

Is there a specific reason you need open source, or is "source available" good enough? A popular one is fmod http://www.fmod.org

It is free for non-commercial products, and also offers sourcecode under a license. It is very popular and isused in many well known games.

mrjoltcola
FMod is very very good. Probably one of the best libraries of any sort that I have ever used. Great documentation and very straight forward.
mfperzel
+3  A: 

A long time ago, there was OpenAL and was moderately successful on Linux.

It's fairly easy, modelled around the OpenGL library principles.

graham.reeds
...and the project is still very much alive and popular today...
seanhodges
To be honest I haven't looked at it since I left that scene several years ago.
graham.reeds
ok, thanks a lot and nice boobs :-P
Werner
Thanks, but they aren't mine.
graham.reeds
A: 

SDL is Good Option for Graphics/Sound

QT frame work has also good support for sound and graphics

PortAudio is also good option

mihirpmehta
While I agree that PortAudio was a good alternative:"The current proposal is to complete the V19 release in 1 months time (4th June 2006)."It's dead :(
Andreas
A: 

The irrKlang sound engine is very popular amoung independent developers. It is free for non-commercial use and still very cheap, if you want to start earning some money with your game.

It supports all major plattforms (Windows, Linux, Mac) and has APIs for C++ and .Net languages.

Frank Bollack
+1  A: 

While you got a few answers regarding how to output sound I believe that wasn't your question.

If I got your question correctly I think "Sound Synthesis" is what you are looking for.

All you need is a bunch of generators (e.g. Sine, Sawtooth, Noise) and filters (low,high,band); And combine these.

Next step would be adding LFOs (Low-Frequency-Oscillators) to modulate parameters of the generators and filters.

I'm aware that this is not the full answer you looked for, but sound synthesis is a science in itself and the above keywords should get you started on the right track.

As for realtime synthesis of SFX for games. Simple answer: Don't do it!

It's a waste of resources and - unless you have very strict size limits - the size of the samples used for SFX won't kill you.

For our current game the average sample has a(n on disk) size of around 7KB. (We use 16KHz, mono, ADPCM wavs most of the time.)

Andreas