cubos::engine::AudioSource struct

Component which makes an entity emit sound.

The behavior of this component can be controlled through the AudioPlay, AudioStop and AudioPause components. Take a look at the audio sample for more information.

If the cone angles are changed, the audio source becomes directional, in which case it points in the direction specified by LocalToWorld::forward.

Public variables

bool playing
Whether the source is playing or not.
bool looping
Whether the source should loop sounds instead of stopping.
float gain
Gain of the source.
float pitch
Pitch of the source.
float maxDistance
Maximum distance at which the source is heard.
float minDistance
Minimum distance at which the source is heard.
float innerConeAngle
Inner cone angle of the source.
float outerConeAngle
Outer cone angle of the source.
float outerConeGain
Outer cone gain of the source.
Asset<Audio> sound
Sound to be played by the source.