From dc876aaf4e455ddae9923b73d8649c25bc87414a Mon Sep 17 00:00:00 2001 From: Nwhis <17502190+Nwhis@users.noreply.github.com> Date: Wed, 1 Mar 2023 19:45:22 -0600 Subject: [PATCH] Improved clarity of documentation Sound:setSoundLevel doesn't work on a sound that's already playing. Removed redundant return value names on dsp functions --- lua/starfall/libs_sh/sound.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/starfall/libs_sh/sound.lua b/lua/starfall/libs_sh/sound.lua index a48a7760b..b49e0b403 100644 --- a/lua/starfall/libs_sh/sound.lua +++ b/lua/starfall/libs_sh/sound.lua @@ -186,7 +186,7 @@ function sound_methods:isPlaying() return unwrap(self):IsPlaying() end ---- Sets the sound level in dB. Won't work unless the sound is playing. +--- Sets the sound level in dB. Won't work if the sound is already playing. -- @param number level dB level, for information on the value to use see https://developer.valvesoftware.com/wiki/Soundscripts#SoundLevel function sound_methods:setSoundLevel(level) checkluatype(level, TYPE_NUMBER) @@ -199,15 +199,15 @@ function sound_methods:getSoundLevel() return unwrap(self):GetSoundLevel() end ---- Sets the sound dsp +--- Sets the sound dsp value -- @param number dsp (0 - 133) DSP values. List can be found here https://developer.valvesoftware.com/wiki/Dsp_presets function sound_methods:setDSP(dsp) checkluatype(dsp, TYPE_NUMBER) unwrap(self):SetDSP(math.Clamp(dsp, 0, 133)) end ---- Gets the sound dsp --- @return number dsp (0 - 133) DSP value. +--- Gets the sound dsp value +-- @return number (0 - 133) DSP value. function sound_methods:getDSP() return unwrap(self):GetDSP() end