Home | nevrax.com |
|
The NeL Sound Engine
OverviewThe purpose of the NeL Sound Engine is to provide a high-level library to play sounds and apply environmental effects. Here are the types of sounds that can be played:
Both the environment sounds and the environmental effects can be dynamically changed, using a tag to select them in a bank. For example, you could have a "day" and a "night" configuration for a single environmental effect. Somes classes encapsulate the functionalities of common 3D audio API, such as OpenAL (http://www.openal.org) and DirectSound3D (http://www.microsoft.com/directx) with EAX (http://eax.creative.com): CSoundDriver, IListener, ISource, IBuffer. As in NeL 3D, the low level uses a dynamic library to provide a device-independant layer. At present time, a library for OpenAL has been made. OpenAL is a cross-platform, free softwaree API for 3D audio. The high-level library is intended for the game developers that write the game client. Is is made available through a small set of user include files, as in NeL 3D. Although a great number of sources can be created by the user, sound cards and audio APIs limit the number of simultaneous sound sources to a small number (usually 32). The library is able to balance the sources to choose which ones have to be heard, depending on their priority and their distance from the listener. An environment sound object (envsound) is a node of an envsound tree, the root of which is returned by UAudioMixer::loadEnvSounds(). The root is the world envsound: it has no bounds. The areas of children envsounds have bounds and they must be totally included in the area of their parent envsound, so that the listener is located in one and only one envsound area Here is an example of an envsound tree, showing a geographical view and the tree view:
Root (world envsound) / \ Transition Transition | | Cave1 City / \ Transition Transition | | Building1 Building2 The library performs automatically the mix of environment sources channels contained in most of the envsounds (playing random sounds and crossfading them). The library applies automatically the environmental effects as well. Finally, it handles object allocation, config file and buffer loading, etc. As a conclusion, all the game developer has to do at the very least is to:
FilesThe environment sounds parameters, such as their 3D area, and the environmental effects parameters are created using an editor. It is likely that it will be a 3DSMax plug-in. The sounds used for sources have parameters as well, for example their cone angles. An editor is provided, at the convenience of a sound designer. It can be found in /code/nel/tools/sounds. This editor takes a names file (a text file with one name per line) in input. It allows the game developers to identify the sounds by the names they have chosen.
(The examples are given for my Windows configuration) Include paths needed:
Please report any problems to cado@nevrax.com or use the mailing list nel@nevrax.org. In the future, the sound will not be loaded staticly anymore. A streaming feature is technically feasable. EAX provides functionalities for sound occlusion/obstruction between a source and the listener. These are not used at present.
|