コード例 #1
0
        /// <summary>
        /// Plugs an "add-on" into the standard stream and sample creation functions
        /// </summary>
        /// <param name="file">Filename of the add-on/plugin</param>
        /// <returns>the loaded plugin's handle is returned</returns>
        public static int BASS_PluginLoad(string file)
        {
            int hplugin;

            if (Environment.Is64BitProcess)
            {
                hplugin = BassX64.BASS_PluginLoad(file, BASSFileFlag.BASS_UNICODE);
            }
            else
            {
                hplugin = BassX86.BASS_PluginLoad(file, BASSFileFlag.BASS_UNICODE);
            }

            if (hplugin == 0)
            {
                throw new ApplicationException("BASS_PluginLoad Fail," + BassErrorCode.GetErrorInfo());
            }

            return(hplugin);
        }