addSound

fun addSound(name: String, dataFormat: String, assetId: String, rate: Int? = null, sampleCount: Int? = null, path: Path? = null): Sound

Adds a sound to the sprite.

Parameters

name

The name of the sound.

dataFormat

The format of the sound file.

assetId

The MD5 hash of the sound file.

rate

The sample rate.

sampleCount

The number of samples.

path

The local path to the sound file.


fun addSound(path: Path, name: String): Sound

Adds a sound from a local file.

Parameters

path

The path to the sound file.

name

The name for the sound.