Esempio n. 1
0
        public bool Execute(WiseReusltHandler handler, out AKRESULT akresult)
        {
            switch (LoadMode)
            {
                case AudioBank_LoadMode.Aync:
                    akresult = AkBankManager.LoadBank(BankName, DefaultAyncHandler);
                    if(akresult == AKRESULT.AK_BankAlreadyLoaded)
                        return true;
                    if(handler != null)
                        lastReulstHandler += handler;
                    return false;
                case AudioBank_LoadMode.DecodeOnLoad:
                    akresult = AkBankManager.LoadBank(BankName, true, false);
                    break;

                case AudioBank_LoadMode.DecodeOnLoadAndSave:
                    akresult = AkBankManager.LoadBank(BankName, true, true);
                    break;


                case AudioBank_LoadMode.Normal:
                    akresult = AkBankManager.LoadBank(BankName);
                    break;
                default:
                    akresult = AKRESULT.AK_UnHandled;
                    break;
            }

            return true;
        }
Esempio n. 2
0
        public void DoLoadBank(AKBankAtom atom, WiseReusltHandler handler = null)
        {
            AKRESULT akresult;

            if (atom.Execute(handler, out akresult))
            {
                if (handler != null)
                {
                    handler(akresult);
                }
                else
                {
                    AudioUtil.VerifyAKResult(akresult, "load atom:{0}", atom.BankName);
                }
            }
        }
Esempio n. 3
0
        public void LoadAtom(string bankName, bool ignoreIfAssetNotExist,
                             AudioBank_LoadMode loadMode, WiseReusltHandler handler)
        {
            AKBankAtom atom = bankAtomSet.Get(bankName);

            if (atom == null)
            {
                if (ignoreIfAssetNotExist)
                {
                    if (handler != null)
                    {
                        handler(AKRESULT.AK_BankNotLoadYet);
                    }
                    return;
                }

                atom = bankAtomSet.Register(bankName, loadMode);
            }
            bankAtomSet.DoLoadBank(atom, handler);
        }
Esempio n. 4
0
 public static void LoadSimpleBank(string bankName, AudioBank_LoadMode loadMode, WiseReusltHandler reusltHandler)
 {
     if (bankResLoader == null)
     {
         return;
     }
     bankResLoader.LoadAtom(bankName, false, loadMode, reusltHandler);
 }
Esempio n. 5
0
 public void LoadAtom(string bankName, bool ignoreIfAssetNotExist, WiseReusltHandler handler)
 {
     LoadAtom(bankName, ignoreIfAssetNotExist, AudioBank_LoadMode.Normal, handler);
 }