ChannelAudioComponent
A Component that can be added to an entity to enable channel audio effects.
This component do not take audio source's position and orientation into account, left channel is heard from the left, and the right channel is heard from the right.
Notes:
Do not add ObjectAudioComponent, AmbientAudioComponent, and ChannelAudioComponent to the same entity simultaneously.
Always add ObjectAudioComponent, AmbientAudioComponent, or ChannelAudioComponent to the entity before calling Entity.prepareAudio or Entity.playAudio.
Constructors
Link copied to clipboard
constructor()
Creates a ChannelAudioComponent instance with empty settings.
constructor(@FloatRange(from = 0.0, to = 1.0) volume: Float = 1.0f)
Creates a ChannelAudioComponent instance with the specified volume. If the volume is invalid, not in range [0.0, 1.0], use default 1.0f instead.