Sign in to follow this  

where to start for sound

This topic is 2331 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
[url="http://www.fmod.org"]FMOD[/url] is the bees' knees. Not quite sure if it gets [i]all[/i] of your requirements but it should get almost all of them and is super easy to use.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 2331 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this