Hello people!
After releasing the first beta of my game, it was time to clean up some messy code. I used the FMOD sound engine instead of the standard esenthel objects for sound, but by using that library directly, my code wasn't as clear as it could be. (FMOD is a bit more lowlevel.)
Now I've spent this week rewriting the sound part of my program, wrapping all FMOD code in a way that makes it look more like esenthel objects and structs. And of course, combining lots of functions you don't really need to know about if you're just making a game.
Anyway... If someone is interested in using FMOD, take a look at this package:
http://attr-x.net/index.php?option=com_c...&Itemid=10 (the download near the bottom of the page)
I have included esenthel's sound tutorials, altered for this wrapper. And some other code snippets that can be handy.
Advantages of the EE sound library are:
* logarithmic sound rolloff to make sound behave more realistic in 3D. (As opposed to linear rolloff, which is not like sound behaves in the real world.)
* Volumegroups are replaced by channelgroups, because you can also add effects to them.
* Improved and flexible doppler effect on moving sounds and the listener position.
* Underwater effect, with depth factor.
* You can select what sound driver you want to use.
* Reverb can be added to world positions. There are about 20 presets (room, cave, hall, dizzy etc.) which will blend into another if they overlap.
Things to do:
* working with pak files. (Dunno if it is possible. FMOD supports callbacks for filesystem handling though.)
* DSP sounds. (not difficult, but a lot of work)
* support for vst plugins. (is available in fmod, but I have to think about how to add it in a logical way.)
* Geometry (to add wall reflections and such. FMOD has a very crude geometry system, but it is good enough for audio reflections. It won't be easy to generate it from meshes I guess.)
* ...
cheers!
yvan