ChannelAudioComponent

@MainThread
class ChannelAudioComponent : Component

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:

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.

Properties

Link copied to clipboard
var volume: Float

The volume of the audio. The valid value range is [0.0, 1.0]. The default value is 1.0f.

Functions

Link copied to clipboard
open override fun clone(): Component

Creates and returns a copy of this Component instance.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String