Documentation/Entity Types/Base/StaticSound.type
From NeoAxis Engine Wiki
| Language: | Status: | Approved |
Contents |
Description
It is often necessary to place a sound source on the map. Such a sound source may be used for implementing a large variety of sounds from sounds of nature to noises of the city. You can add a sound source to the map by means of a StaticSound object.
Creating a sound source
In order to add a sound source to the map, select the StaticSound object form the Base folder in the Entity Types window. Now, click on the desired location of the map. After an object has been created, you can freely move it around the map.
Setting up a sound source
Like most object types, StaticSound objects also have their own settings.
First, you have to specify the name of the file containing the sound to be produced by the sound source. To do this, use the SoundName parameter. The file will be chosen from those stored in the Data folder of the project.
We recommend that you keep all sound files in the \Data\Sounds folder, or directly in the folder of the corresponding object.
You can also specify sound volume, using the Volume parameter, as well as configure other required parameters.
Properties
| Name | Description |
|---|---|
| MinDistance | This parameter specifies the minimal distance from the listening position at which sound begins to weaken. |
| Pitch | Playback speed. Use this parameter to specify how fast the sound will be played. The higher is the value of this parameter, the higher is the playback speed. |
| Priority | With this parameter you can specify audio playback priority. With a large number of sounds being played simultaneously, sounds with lower priority will be shut down (since it is impossible to play all sounds due to existing limitations of sound cards). |
| SoundName | Name of the sound file to be played by the source. |
| Stream | This parameter enables sound reading while playing. We recommend that you use this parameter for large files, since by default sounds are loaded into memory. |
| Volume | Specifies sound volume. |