Пример #1
0
        public static bool BASS_WINAMP_GetFileInfo(string file, ref string title, ref int lenms)
        {
            bool flag = false;

            title = new string('\0', 255);
            GCHandle gchandle = GCHandle.Alloc(title, GCHandleType.Pinned);

            try
            {
                flag = BassWinamp.BASS_WINAMP_GetFileInfoIntPtr(file, gchandle.AddrOfPinnedObject(), ref lenms);
                if (flag)
                {
                    title = Utils.IntPtrAsStringAnsi(gchandle.AddrOfPinnedObject());
                }
                else
                {
                    title = string.Empty;
                }
            }
            finally
            {
                gchandle.Free();
            }
            return(flag);
        }
Пример #2
0
        public static string BASS_WINAMP_GetName(int handle)
        {
            IntPtr intPtr = BassWinamp.BASS_WINAMP_GetNamePtr(handle);

            if (intPtr != IntPtr.Zero)
            {
                return(Utils.IntPtrAsStringAnsi(intPtr));
            }
            return(null);
        }
Пример #3
0
        public static string[] BASS_WINAMP_FindPlugins(string pluginpath, BASSWINAMPFindPlugin flags)
        {
            flags &= ~BASSWINAMPFindPlugin.BASS_WINAMP_FIND_COMMALIST;
            IntPtr intPtr = BassWinamp.BASS_WINAMP_FindPluginsPtr(pluginpath, flags);

            if (intPtr != IntPtr.Zero)
            {
                return(Utils.IntPtrToArrayNullTermAnsi(intPtr));
            }
            return(null);
        }
Пример #4
0
        public static string BASS_WINAMP_GetExtentionsFilter(int handle)
        {
            IntPtr intPtr = BassWinamp.BASS_WINAMP_GetExtentions(handle);

            if (!(intPtr != IntPtr.Zero))
            {
                return(null);
            }
            string[] array = Utils.IntPtrToArrayNullTermAnsi(intPtr);
            if (array != null && array.Length >= 0)
            {
                string text = "";
                foreach (string str in array)
                {
                    text = text + str + "|";
                }
                return(text.Substring(0, text.Length - 1));
            }
            return(null);
        }
Пример #5
0
 public static int BASS_WINAMP_StreamCreate(string file, BASSFlag flags)
 {
     flags &= (BASSFlag.BASS_SAMPLE_8BITS | BASSFlag.BASS_SAMPLE_MONO | BASSFlag.BASS_SAMPLE_LOOP | BASSFlag.BASS_SAMPLE_3D | BASSFlag.BASS_SAMPLE_SOFTWARE | BASSFlag.BASS_SAMPLE_MUTEMAX | BASSFlag.BASS_SAMPLE_VAM | BASSFlag.BASS_SAMPLE_FX | BASSFlag.BASS_SAMPLE_FLOAT | BASSFlag.BASS_RECORD_PAUSE | BASSFlag.BASS_RECORD_ECHOCANCEL | BASSFlag.BASS_RECORD_AGC | BASSFlag.BASS_STREAM_PRESCAN | BASSFlag.BASS_STREAM_AUTOFREE | BASSFlag.BASS_STREAM_RESTRATE | BASSFlag.BASS_STREAM_BLOCK | BASSFlag.BASS_STREAM_DECODE | BASSFlag.BASS_STREAM_STATUS | BASSFlag.BASS_SPEAKER_FRONT | BASSFlag.BASS_SPEAKER_REAR | BASSFlag.BASS_SPEAKER_REAR2 | BASSFlag.BASS_SPEAKER_LEFT | BASSFlag.BASS_SPEAKER_RIGHT | BASSFlag.BASS_SPEAKER_PAIR8 | BASSFlag.BASS_ASYNCFILE | BASSFlag.BASS_SAMPLE_OVER_VOL | BASSFlag.BASS_WV_STEREO | BASSFlag.BASS_AC3_DOWNMIX_2 | BASSFlag.BASS_AC3_DOWNMIX_4 | BASSFlag.BASS_AC3_DYNAMIC_RANGE | BASSFlag.BASS_AAC_FRAME960);
     return(BassWinamp.BASS_WINAMP_StreamCreateAnsi(file, flags));
 }