AudioMixerGroupResource

Manages a group of audio resources.

Provides group-level volume and playback speed control for audio resources configured with com.pico.spatial.core.ecs.audio.AudioResourceConfig using the same mixerGroupID.

The name of the AudioMixerGroupResource acts as the link between AudioResource and AudioMixerGroupResource. To control volume and playback speed by group, audio resources must be loaded with a com.pico.spatial.core.ecs.audio.AudioResourceConfig whose mixerGroupID matches the name of the AudioMixerGroupResource.

Constructors

Link copied to clipboard
constructor(name: String, volume: Float = 1.0f, playbackSpeed: Float = 1.0f)

The constructor of AudioMixerGroupResource, which is used to create an AudioMixerGroupResource instance with a specified name, volume, and playback speed.

Functions

Link copied to clipboard
open override fun close()

You need to manually release the resource to free the memory it occupies.

Link copied to clipboard
fun getName(): String

Gets the name of the AudioMixerGroupResource.

Link copied to clipboard
fun getPlaybackSpeed(): Float

Gets the playback speed of the AudioMixerGroupResource.

Link copied to clipboard
fun getVolume(): Float

Gets the volume of the AudioMixerGroupResource.

Link copied to clipboard
fun setPlaybackSpeed(playbackSpeed: Float)

Sets a playback speed for the AudioMixerGroupResource.

Link copied to clipboard
fun setVolume(volume: Float)

Sets a volume for the AudioMixerGroupResource.