ChannelAudioComponent

constructor()

Creates a ChannelAudioComponent instance with empty settings.


constructor(@FloatRange(from = 0.0, to = 1.0) volume: Float = 1.0f)

Creates a ChannelAudioComponent with an initial volume.

Note: The value must be within [0.0, 1.0], otherwise an IllegalArgumentException is thrown. Defaults to 1.0f when not provided.

Parameters

volume

Initial volume in [0.0, 1.0], default 1.0f.

Throws

IllegalArgumentException

if the volume is not in the range [0.0, 1.0].