Esempio n. 1
0
        public static void PreviewEvent(EditorEventRef eventRef)
        {
            bool load = true;

            if (previewEventDesc != null)
            {
                Guid guid;
                previewEventDesc.getID(out guid);
                if (guid == eventRef.Guid)
                {
                    load = false;
                }
                else
                {
                    PreviewStop();
                }
            }

            if (load)
            {
                CheckResult(System.loadBankFile(EventManager.MasterBank.Path, FMOD.Studio.LOAD_BANK_FLAGS.NORMAL, out masterBank));
                CheckResult(System.loadBankFile(eventRef.Banks[0].Path, FMOD.Studio.LOAD_BANK_FLAGS.NORMAL, out previewBank));

                CheckResult(System.getEventByID(eventRef.Guid, out previewEventDesc));
                CheckResult(previewEventDesc.createInstance(out previewEventInstance));
            }

            CheckResult(previewEventInstance.start());
        }
Esempio n. 2
0
 public static void Init()
 {
     FMOD.Studio.System.create(out _System);
     _System.getLowLevelSystem(out FMOD.System low);
     low.setSoftwareFormat(0, FMOD.SPEAKERMODE._7POINT1, 0);
     _System.initialize(1, FMOD.Studio.INITFLAGS.NORMAL, FMOD.INITFLAGS.NORMAL, IntPtr.Zero);
     _System.loadBankFile(FileSystemManager.RootDirectory + "/Content/Banks/Master_Bank.bank", FMOD.Studio.LOAD_BANK_FLAGS.NORMAL, out Bank MainBank);
     _System.loadBankFile(FileSystemManager.RootDirectory + "/Content/Banks/Master_Bank.strings.bank", LOAD_BANK_FLAGS.NORMAL, out Bank MainBankStrings);
     MainBank.getEventList(out MainEvents);
     DumpEventInformation();
 }
Esempio n. 3
0
        public void LoadBank(string path, bool loadSamples = true)
        {
            Console.WriteLine("Loading banks");

            FMOD.Studio.Bank bank;

            Utilities.checkResult(_system.loadBankFile(path, FMOD.Studio.LOAD_BANK_FLAGS.NORMAL, out bank));

            if (loadSamples)
            {
                LoadBankSamples(bank);
            }

            Notifications.Instance.EventsChanged.OnNext("loaded " + path);
            //_eventsChanged.OnNext("loaded " + path);
        }