Skip to main content

Type Alias: SoundPacket

SoundPacket = object

Defined in: src/sdk/utils/sound/SoundServer.ts:10

A sound packet that can be played by SoundServer.

Properties

continuous

continuous: boolean

Defined in: src/sdk/utils/sound/SoundServer.ts:21

Whether this packet should loop from the beginning when its sequence is finished playing.


key

key: string

Defined in: src/sdk/utils/sound/SoundServer.ts:12

The key of this packet. Only one packet with any given key can be playing at a time.


sequence

sequence: string | readonly string[]

Defined in: src/sdk/utils/sound/SoundServer.ts:18

The sequence of sound atoms to play for this packet, as either a single ID or an array of IDs. Each atom is a single sound file.


timeout?

optional timeout: number

Defined in: src/sdk/utils/sound/SoundServer.ts:30

The amount of time, in milliseconds, after this packet starts playing at which to forcibly stop this packet. This value is required in case any sound atoms could not be played or sim does not notify the sound server that a sound atom has stopped playing. It is recommended to set this value to be at least several seconds longer than the expected length of this packet's entire sequence. If this packet is continuous, the timeout is reset with each loop. Defaults to 10000 milliseconds.