3D Sound Synthesis :: Clunk

While working on a cozy arcade project, I regretted that OpenAL was taking too much of my time. Not only did he have to write a sound manager for him about a thousand and a half lines of code, but he also had to deal with all kinds of black magic. (For example, an implementation from nvidia tightly hung Wend) Therefore, I suddenly decided that I spent enough time on it and wrote my own bike, which was successfully run in the field, and released with open source on sourceforge.

In general, our ear is not such a tricky device. The ear determines the position of the source in two ways. In the horizontal plane, sound arrives in one ear a little earlier than the other. Simple trigonometry multiplied by the diameter of the head and the thing in the hat! :)
The second method is already much more complicated - the head has a different density and different technological holes, therefore, the spectrum of the sound is distorted differently depending on the direction of the signal. There have been many attempts to make a reference head (nothing shameful, even Steve Jobs did it), fill it with a jelly-like brain substitute and measure distortions of the reference sound, for example, the KEMAR project from MIT.

My project is called Clunk, and can do almost everything that a sound library needs to know:
  • An infinite amount of everything: music streams (SDL_Mix can only one, for example), objects and named sound sources attached to objects or the listener.
  • Simple api in c ++. (In OpenAL, you have to rebuild the scene yourself in order to transfer 16 sources closer to the listener, restarting the sources (sic), I also recommend watching the example “How to make background music on OpenAL” , ~ half a hundred lines of code = -O))
  • HRTF, HDT described above (actually 3d sound)
  • Support for all distance models (volume drop depending on distance) from OpenAL
  • Optional optimization for processors with SSE technology
  • Doppler effect
  • It should work under all platforms where there is SDL, does not contain platform-specific code.
  • License LGPL 2.1 - can be used in commercial products.


The project address on sf.net: https://sourceforge.net/projects/clunk
If you are interested, you can safely write to me in icq, I am ready to answer any questions.