ChannelAudioComponent

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.

Parameters

volume

The volume to set. The valid value range is [0.0, 1.0]. The default value is 1.0f. If the specified volume is not in the valid range, 1.0f will be used by default.