SoundObject

Available in: Interface Scripts Client Entity Scripts Server Entity Scripts Assignment Client Scripts

An audio resource, created by SoundCache.getSound, to be played back using Audio.playSound.

Supported formats:

  • WAV: 16-bit uncompressed WAV at any sample rate, with 1 (mono), 2(stereo), or 4 (ambisonic) channels.
  • MP3: Mono or stereo, at any sample rate.
  • RAW: 48khz 16-bit mono or stereo. Filename must include ".stereo" to be interpreted as stereo.
Signals

Properties:
Name Type Description
downloaded boolean true if the sound has been downloaded and is ready to be played, otherwise false.
duration number The duration of the sound, in seconds.

Signals

ready() → {Signal}
Triggered when the sound has been downloaded and is ready to be played.
Returns:
Type: Signal