package Sound import NoWurst /** Sets the sound duration in milliseconds */ public function sound.setDuration(int dur) SetSoundDuration(this, dur) public function sound.play() StartSound(this) public function sound.stop(boolean killWhenDone, boolean fadeOut) StopSound(this, killWhenDone, fadeOut) public function sound.setChannel(int channel) SetSoundChannel(this, channel) public function sound.setPitch(real pitch) SetSoundPitch(this, pitch) /** Sets the sound's volume [0-100] */ public function sound.setVolume(int volume) SetSoundVolume(this, volume) public function sound.setConeAngles(real inside, real outside, int outsideVolume) SetSoundConeAngles(this, inside, outside, outsideVolume) public function sound.setCutoff(real cutoff) SetSoundDistanceCutoff(this, cutoff) /** Plays the sound, starting at the given position */ public function sound.playPosition(int millisecs) this.play() SetSoundPlayPosition(this, millisecs) /** Returns sound length in milliseconds. Beware that sound lengths of game assets may differ between different locales, and thus return a different duration. If you use a async duration in a synced manner, it will cause a desync. */ public function sound.getDuration() returns int return GetSoundDuration(this) public function sound.isPlaying() returns boolean return GetSoundIsPlaying(this)