Below is a sample sound configuration, with links to documentation for every attribute. See tutorial about sounds for information how to initialize sound repository from such XML configuration.
<?xml version="1.0"?> <sounds> <!-- Contains a list of <sound> elements. Only the "name" attribute is required, and all names must be unique. --> <sound name="player_sudden_pain" url="" default_importance="max" gain="1.0" min_gain="0.0" max_gain="1.0" /> <!-- And more <sound> elements... --> <sound name="test_sound_1" /> <sound name="test_sound_2" /> <sound name="test_sound_3" /> </sounds>
Right now we support OggVorbis and (uncompressed) WAV files.
A general advice when creating sounds is to keep them normalized, which means "as loud as possible". It doesn't matter if you record a mouse squeak or a plane engine, the sound file should be equally loud. This allows to have best quality sound.
Scale the sound by changing the
in sound configuration.
If sound is supposed to be spatialized (i.e. played by Sound3D method), make sure it is mono. Some OpenAL implementations never spatialize stereo sounds.
Specifically when making footsteps sound: synchronize it's duration with the HeadBobbingTime, which you can set for example using player XML configuration file (if your game loads it). By default it's 0.5, which means your footsteps sound should be around half-second long. Or you can record 2 footsteps and make it 1-second long.
The important thing is to synchronize these times, to make them feel right in the game — visuals (head bobbing) should match what you hear (footsteps sound).