Beispiel #1
0
 public static extern int BASS_PluginLoad([In, MarshalAs(UnmanagedType.LPWStr)] string file, BASSFileFlag flags);
Beispiel #2
0
        /// <summary>
        /// 打开文件
        /// </summary>
        /// <param name="mem">true:流;false:文件</param>
        /// <param name="file">文件路径</param>
        /// <param name="offset"></param>
        /// <param name="length"></param>
        /// <param name="flags"></param>
        public static int BASS_StreamCreateFile(bool mem, string file, long offset, long length, BASSFileFlag flags)
        {
            int handle;

            if (Environment.Is64BitProcess)
            {
                handle = BassX64.BASS_StreamCreateFile(mem, file, offset, length, flags);
            }
            else
            {
                handle = BassX86.BASS_StreamCreateFile(mem, file, offset, length, flags);
            }

            int errCode = Bass.BASS_ErrorGetCode();

            if (errCode != BassErrorCode.BASS_OK)
            {
                throw new Exception(BassErrorCode.GetErrorInfo());
            }

            return(handle);
        }
Beispiel #3
0
 public static extern int BASS_StreamCreateFile([MarshalAs(UnmanagedType.Bool)] bool mem, [In, MarshalAs(UnmanagedType.LPWStr)] string file, long offset, long length, BASSFileFlag flags);