diff --git a/assets/fmod20221/init.lua b/assets/fmod20221/init.lua index 48e4a7fb..b53ed31d 100644 --- a/assets/fmod20221/init.lua +++ b/assets/fmod20221/init.lua @@ -100,6 +100,7 @@ end -------------------------- +---@type table|fun(name:string, args:{instant?:boolean, volume?:number, pitch?:number, tune?:number, fine?:number, pos?:table, param?:table}):FMOD.Studio.EventInstance? M.music={} ---@param v number @@ -210,8 +211,12 @@ function M.music.getPlaying() return playing.event end +local playMusic=M.music.play +setmetatable(M.music,{__call=function(_,...) playMusic(...) end}) + -------------------------- +---@type table|fun(name:string, args:{instant?:boolean, volume?:number, pitch?:number, tune?:number, fine?:number, pos?:table, param?:table}):FMOD.Studio.EventInstance? M.effect={} ---@param v number @@ -309,6 +314,9 @@ function M.effect.stop(name,instant) end end +local playEffect=M.effect.play +setmetatable(M.effect,{__call=function(_,...) playEffect(...) end}) + -------------------------- M.vocal={} diff --git a/assets/scene/setting_out.lua b/assets/scene/setting_out.lua index ffa433ae..a9579eb0 100644 --- a/assets/scene/setting_out.lua +++ b/assets/scene/setting_out.lua @@ -79,8 +79,10 @@ scene.widgetList={ {name='2',type='slider', pos={0,0},x=340, y=800,w=650, fontSize=30,text=LANG'setting_fmod_DSPBufferLength', widthLimit=260, axis={3,16,1},valueShow=function(S) return 2^S.disp() end, disp=function() return MATH.roundLog(SETTINGS.system.fmod_DSPBufferLength,2) end, code=function(v) SETTINGS.system.fmod_DSPBufferLength=2^v end}, {name='2',type='button', pos={0,0},x=400, y=870,w=140, h=60,fontSize=30,text=LANG'setting_apply', code=function() FMODLoadFunc() - debug.setupvalue(getBgm,1,nil) + FMOD.setMainVolume(SETTINGS.system.mainVol,true) + stopBgm() PROGRESS.playExteriorBGM() + FMOD.effect.play('beep_notice') end}, -- Video