Documentation/Entity Types/Base/SoundSource.type

From NeoAxis 3D Engine Wiki

Jump to: navigation, search
Go to higher level

Description

SoundSource.type can be used to place a sound source on the map.

SoundSource 01.jpg

Creating

In order to add a sound source to the map, select the SoundSource type form the Base/Types folder in the Object Creation window. After an object has been added to the editor workspace, select it and adjust configuration in the property window.

Like many other object types in the engine, SoundSource has its special parameters. Two basic of them are the path to the sound file (SoundName) and the volume (Volume).

Properties

Sound source special properties are located in the "class SoundSource" group.


Name Description
class Entity
Components List of attached components.
LogicClass Reference to the Logic Editor class. Read more about how to work with the Logic Editor class.
Name Object name.
Tags User defined information. Defined as keyvalue pairs. It is used for user's needs.
Type Object type. It can not be changed.
class MapObject
Position Object position on the map.
Rotation Object rotation. The angle of rotation is set in degrees.
Scale Object scaling.
class SoundSource
Enabled Enables/Disables the sound source.
MaxDistance The distance between the source and the auditor, at which the sound stops being heard.
MinDistance The distance between the source and the auditor, at which the volume of sound begins to decrease.
Pitch Playback speed. The value of "1" corresponds to normal playback speed.
Priority The priority of playback. This parameter allows to configure the priority of the given source during playback. If a lot of sounds are played simultaneously, the sounds with the minimal priority will be muted as it is impossible to playback all the sounds at once because of sound cards limitations.
ReplayDelay Delay before the replaying. It is set in seconds.
RolloffLogarithmicFactor Sound volume fading coefficient in the logarithmic mode.
RolloffMode Sound volume fading mode. You can choose between the following values: Logarithmic (logarithmic mode), Linear (linear mode), Manually (manual mode). It is the developer who is responsible for sound volume fading regulation.
SoundName Sound file name.
Streaming Enables/Disables the reading of a sound file from the storage device while playback. It is recomended to use it for large files as sounds are loaded to the memory entirely by default.
Volume Volume level. The value of "1" corresponds to the normal volume.
Map Editor
AutoVerticalAlignment Automatical alignment by height mode. Allows to set the value among 4 variants: None (without alignment ), ByBounds (by dimensions), ByBoundsWithRotation (by dimension with possible rotation), ByCenter (by center).
Layer The layer of the map these objects belong to.