From a23ea4fa8e0d3fbc55849eef4c3a468a14011ad5 Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Fri, 28 Jun 2024 04:49:59 +0800 Subject: [PATCH] =?UTF-8?q?fmod=E7=9A=84loadBank2=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E6=89=BE=E4=B8=8D=E5=88=B0=E6=96=87=E4=BB=B6=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E4=B8=8D=E5=86=8D=E7=9B=B4=E6=8E=A5=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/fmod20221/init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/fmod20221/init.lua b/assets/fmod20221/init.lua index 52a173c3..fefc5275 100644 --- a/assets/fmod20221/init.lua +++ b/assets/fmod20221/init.lua @@ -78,7 +78,10 @@ end ---@return FMOD.Studio.Bank? function M.loadBank2(path,flag) if not studio then return end - assert(love.filesystem.getInfo(path),"File not found") + if not love.filesystem.getInfo(path) then + MSG.new('warn',"Bank file not found: "..path) + return + end local file=love.filesystem.newFile(path) local data,size=file:read('data') local bank,res=studio:loadBankMemory(data:getPointer(),size,0,flag or M.FMOD_STUDIO_LOAD_BANK_NORMAL)