diff --git a/assets/fmod20221/init.lua b/assets/fmod20221/init.lua index 5cf4483c..9758ecb0 100644 --- a/assets/fmod20221/init.lua +++ b/assets/fmod20221/init.lua @@ -125,6 +125,13 @@ end ---@type {desc:FMOD.Studio.EventDescription?, event:FMOD.Studio.EventInstance?}? local playing=nil +---Check if a music name exists +---@param name string +---@return boolean +function M.music.check(name) + return musicLib[name]~=nil +end + ---@param name string ---@param args? {instant?:boolean, volume?:number, pitch?:number, tune?:number, fine?:number, pos?:number[], param?:table} ---@return FMOD.Studio.EventInstance? @@ -242,6 +249,13 @@ function M.effect.setVolume(v,instant) studio:setParameterByName('EffectVolume',M.mainVolume*M.effectVolume,instant==true) end +---Check if an effect name exists +---@param name string +---@return boolean +function M.effect.check(name) + return effectLib[name]~=nil +end + ---priority: pitch>tune>fine --- ---pos:{x,y,z}