where to start for sound

Started by
3 comments, last by DracoLacertae 12 years, 8 months ago
So the beginner forum isn't my usual posting place, but I've done mostly graphics. Even my most 'complete' little games have very primitive sound: On linux I dump bytes to /dev/dsp, and on windows I just call sndPlaySound(). It is not a solution! Now that I am finally finding the time to sit down and finish writing a simple, focused, complete game and am finding myself at the point where I need to add a much more robust sound solution.


I know there's SDL, WaveOut, OpenAL, etc. From those who have used these (or something else), what do you think would be the best fit for my project:

- My project is in plain C. If sound needs a C++ library and I need to wrap it with some C, its not the end of the world, but C is preferred.
- I need to run in Windows and Linux so DirectSound is out.
- WaveOut is acceptable since it just delivers raw sound bytes. ie. on linux I would just dump to /dev/snd and the actual mixing code can largely by shared.


For a simple project that just runs background music + playing a few effects, is it better to just write my own simple mixer and dump to the card (the old way), or will I really reap a lot of benefits using a fancy API that can do hardware mixing?

I suppose this is the same question that used to be asked when software rasterization was on the way out for graphics.

In terms of functionality, all I really need is:

-Looping
-per-sound-effect volume control
-stereo panning (I don't need fancy 3d positional reflection, occlusion, etc)
-maybe simple echo/reverb
Advertisement
Perhaps SFML? It's C++ though, but the audio part of it seems simple. I've never used it though, actually I never have really used any sound API yet.
FMOD is the bees' knees. Not quite sure if it gets all of your requirements but it should get almost all of them and is super easy to use.
FMOD! it's free for small projects and has the most support and biggest userbase
Black Sky A Star Control 2/Elite like game
Thanks, I'll check out FMOD. I never heard of it, yet the userbase seems bigger then openAL. But its the right price... FREE!

I also looked at SFML. The sound tutorial made the API look super-straightforward, just load some buffers and play them. And its 'more free.'

I'll play with both of them for a bit.

This topic is closed to new replies.

Advertisement