SoundUtils

Utilities View source
SoundUtils

Source on GitHub

Re-exports: Sounds

Classes

SoundInstance

public class SoundInstance

SoundDefinition

public class SoundDefinition

Members:

  • construct(string file)
  • construct(string file, boolean looping)
  • construct(string file, boolean looping, boolean is3D)
  • construct(SoundDefinition cloneFrom)
  • play() returns SoundInstance Plays this sound for all Players with a default duration. Use this if you don’t care when the SoundHandle gets recycled.
  • play(int duration) returns SoundInstance Plays this sound for all Players with the given duration. The duration should be close to the length of the soundfile. Use this to recycle soundhandles immeditely when they finish, allowing for rapid succession of sounds.
  • play(int duration, int volume) returns SoundInstance
  • playForPlayer(player p) returns SoundInstance Plays this sound for the given Player with a default duration. See play() for more info
  • playForPlayer(player p, int duration) returns SoundInstance Plays this sound for the given Player with the given duration. See play() for more info
  • playOnPoint(vec3 target) returns SoundInstance
  • playOnPoint(vec3 target, int duration) returns SoundInstance

DynamicSound

public class DynamicSound

Members:

  • construct(SoundDefinition soundHandle)
  • setTargetPitch(real pitch)
  • play()
  • setAbsolutePitch(real pitch)
  • override function onTimedLoop()

Constants

DEFAULT_SOUND_STOPS_ON_LEAVE_RANGE

constant DEFAULT_SOUND_STOPS_ON_LEAVE_RANGE = true

🔧 Configurable. Override it in your map’s config package.

DEFAULT_SOUND_FADE_IN_RATE

constant DEFAULT_SOUND_FADE_IN_RATE = 10

🔧 Configurable. Override it in your map’s config package.

DEFAULT_SOUND_FADE_OUT_RATE

constant DEFAULT_SOUND_FADE_OUT_RATE = 10

🔧 Configurable. Override it in your map’s config package.

DEFAULT_SOUND_EAX_SETTINGS

constant DEFAULT_SOUND_EAX_SETTINGS = "CombatSoundsEAX"

🔧 Configurable. Override it in your map’s config package.

DEFAULT_SOUND_VOLUME

constant DEFAULT_SOUND_VOLUME = 127

🔧 Configurable. Override it in your map’s config package.

DEFAULT_SOUND_PITCH

constant DEFAULT_SOUND_PITCH = 1.

🔧 Configurable. Override it in your map’s config package.

DEFAULT_SOUND_DURATION

constant DEFAULT_SOUND_DURATION = 10000

🔧 Configurable. Override it in your map’s config package.

SOUND_CHANNEL

constant SOUND_CHANNEL = 5

🔧 Configurable. Override it in your map’s config package.

SOUND_MIN_DIST

constant SOUND_MIN_DIST = 600.

🔧 Configurable. Override it in your map’s config package.

SOUND_MAX_DIST

constant SOUND_MAX_DIST = 8000.

🔧 Configurable. Override it in your map’s config package.

SOUND_DIST_CUT

constant SOUND_DIST_CUT = 1500.

🔧 Configurable. Override it in your map’s config package.