示例#1
0
        public static void UpdateInterroot()
        {
            if (!initialised)
            {
                return;
            }
            //if (!(GameDataManager.GameType == GameDataManager.GameTypes.DS1 ||
            //   GameDataManager.GameType == GameDataManager.GameTypes.DS1R ||
            //   GameDataManager.GameType == GameDataManager.GameTypes.DS3 ||
            //   GameDataManager.GameType == GameDataManager.GameTypes.SDT))
            //{
            //    return;
            //}

            Main.WinForm.Invoke(new Action(() =>
            {
                string possiblePath = GetDirWithBackslash(
                    Utils.Frankenpath(GameDataManager.InterrootPath, GameDataManager.GameType == SoulsAssetPipeline.SoulsGames.BB ? "sound_win" : "sound"));
                result = _eventSystem.setMediaPath(possiblePath);
                if (result == RESULT.OK)
                {
                    MediaPath = possiblePath;
                }
                else
                {
                    ERRCHECK(result);
                    MediaPath = null;
                }
            }));
        }
示例#2
0
        public static void UpdateInterroot()
        {
            //if (!(GameDataManager.GameType == GameDataManager.GameTypes.DS1 ||
            //   GameDataManager.GameType == GameDataManager.GameTypes.DS1R ||
            //   GameDataManager.GameType == GameDataManager.GameTypes.DS3 ||
            //   GameDataManager.GameType == GameDataManager.GameTypes.SDT))
            //{
            //    return;
            //}

            Main.WinForm.Invoke(new Action(() =>
            {
                ERRCHECK(result = _eventSystem.setMediaPath(GetDirWithBackslash(
                                                                Utils.Frankenpath(GameDataManager.InterrootPath, GameDataManager.GameType == GameDataManager.GameTypes.BB ? "sound_win" : "sound"))));
            }));
        }
示例#3
0
        /// <summary>
        /// Init the media path  & eventsystem
        /// </summary>
        #region Constructor(s)
        public FmodFactory()
        {
            // let's create our Event
            result = FMOD.Event_Factory.EventSystem_Create(ref eventsystem);
            ERRCHECK(result);

            // Init the event system object
            result = eventsystem.init(256, FMOD.INITFLAGS.NORMAL, (IntPtr)null, FMOD.EVENT_INITFLAGS.NORMAL);
            ERRCHECK(result);

            // Set the FMOD's default media Path
            result = eventsystem.setMediaPath(path);
            ERRCHECK(result);

            // Load a .fev file exported from FMOD Designer
            result = eventsystem.load("source.fev");
            ERRCHECK(result);

            // Acces to the group data embedded in the .fev file
            result = eventsystem.getGroup("source/Noises", false, ref eventgroup);
            ERRCHECK(result);
        }