Exemple #1
0
 public static int BASS_VST_SetChunk(int vstHandle, [MarshalAs(UnmanagedType.Bool)] bool isPreset, byte[] chunk)
 {
     if (chunk == null || chunk.Length == 0)
     {
         return(-1);
     }
     return(BassVst.BASS_VST_SetChunk(vstHandle, isPreset, chunk, chunk.Length));
 }
Exemple #2
0
        public static bool BASS_VST_ProcessEventRaw(int vstHandle, MidiShortMessage msg)
        {
            int num = 0;

            num |= (int)msg.Data2;
            num |= (int)msg.Data1 << 8;
            num |= (int)msg.Status << 16;
            return(BassVst.BASS_VST_ProcessEventRaw(vstHandle, new IntPtr(num), 0));
        }
Exemple #3
0
        public static BASS_VST_PARAM_INFO BASS_VST_GetParamInfo(int vstHandle, int paramIndex)
        {
            BASS_VST_PARAM_INFO bass_VST_PARAM_INFO = new BASS_VST_PARAM_INFO();

            if (BassVst.BASS_VST_GetParamInfo(vstHandle, paramIndex, bass_VST_PARAM_INFO))
            {
                return(bass_VST_PARAM_INFO);
            }
            return(null);
        }
Exemple #4
0
        public static BASS_VST_INFO BASS_VST_GetInfo(int vstHandle)
        {
            BASS_VST_INFO bass_VST_INFO = new BASS_VST_INFO();

            if (BassVst.BASS_VST_GetInfo(vstHandle, bass_VST_INFO))
            {
                return(bass_VST_INFO);
            }
            return(null);
        }
Exemple #5
0
        public static string BASS_VST_GetProgramName(int vstHandle, int programIndex)
        {
            IntPtr intPtr = BassVst.BASS_VST_GetProgramNamePtr(vstHandle, programIndex);

            if (intPtr != IntPtr.Zero)
            {
                return(Utils.IntPtrAsStringAnsi(intPtr));
            }
            return(null);
        }
Exemple #6
0
        public static byte[] BASS_VST_GetChunk(int vstHandle, bool isPreset)
        {
            int    num    = 0;
            IntPtr intPtr = BassVst.BASS_VST_GetChunk(vstHandle, isPreset, ref num);

            if (intPtr != IntPtr.Zero && num > 0)
            {
                byte[] array = new byte[num];
                Marshal.Copy(intPtr, array, 0, num);
                return(array);
            }
            return(null);
        }
Exemple #7
0
        public static float[] BASS_VST_GetProgramParam(int vstHandle, int programIndex)
        {
            int num = 0;

            IntPtr intPtr = BassVst.BASS_VST_GetProgramParamPtr(vstHandle, programIndex, ref num);

            if (intPtr != IntPtr.Zero && num > 0)
            {
                float[] array = new float[num];
                Marshal.Copy(intPtr, array, 0, num);
                return(array);
            }
            return(null);
        }
Exemple #8
0
        public static string[] BASS_VST_GetProgramNames(int vstHandle)
        {
            int num = BassVst.BASS_VST_GetProgramCount(vstHandle);

            if (num > 0)
            {
                string[] array = new string[num];
                for (int i = 0; i < num; i++)
                {
                    array[i] = BassVst.BASS_VST_GetProgramName(vstHandle, i);
                }
                return(array);
            }
            return(null);
        }
Exemple #9
0
        public static void BASS_VST_SetParamRestoreDefaults(int vstHandle)
        {
            if (vstHandle == 0)
            {
                return;
            }
            int num = BassVst.BASS_VST_GetParamCount(vstHandle);

            BASS_VST_PARAM_INFO bass_VST_PARAM_INFO = new BASS_VST_PARAM_INFO();

            for (int i = 0; i < num; i++)
            {
                BassVst.BASS_VST_GetParamInfo(vstHandle, i, bass_VST_PARAM_INFO);
                BassVst.BASS_VST_SetParam(vstHandle, i, bass_VST_PARAM_INFO.defaultValue);
            }
        }
Exemple #10
0
        public static void BASS_VST_SetParamCopyParams(int sourceVstHandle, int destinVstHandle)
        {
            if (sourceVstHandle == 0 || destinVstHandle == 0)
            {
                return;
            }
            BASS_VST_INFO bass_VST_INFO  = new BASS_VST_INFO();
            BASS_VST_INFO bass_VST_INFO2 = new BASS_VST_INFO();

            if (BassVst.BASS_VST_GetInfo(sourceVstHandle, bass_VST_INFO) && BassVst.BASS_VST_GetInfo(destinVstHandle, bass_VST_INFO2) && bass_VST_INFO.uniqueID == bass_VST_INFO2.uniqueID && bass_VST_INFO.effectName.Equals(bass_VST_INFO2.effectName))
            {
                int num = BassVst.BASS_VST_GetParamCount(sourceVstHandle);
                for (int i = 0; i < num; i++)
                {
                    BassVst.BASS_VST_SetParam(destinVstHandle, i, BassVst.BASS_VST_GetParam(sourceVstHandle, i));
                }
            }
        }
Exemple #11
0
 public static bool BASS_VST_ProcessEventRaw(int vstHandle, MidiSysExMessage msg)
 {
     return(BassVst.BASS_VST_ProcessEventRaw(vstHandle, msg.Message, msg.MessageLength));
 }
Exemple #12
0
        public static int BASS_VST_ChannelCreate(int freq, int chans, string dllFile, BASSFlag flags)
        {
            flags |= BASSFlag.BASS_UNICODE;

            return(BassVst.BASS_VST_ChannelCreateUnicode(freq, chans, dllFile, flags));
        }
Exemple #13
0
 public static int BASS_VST_ChannelSetDSP(int chan, string dllFile, BASSVSTDsp flags, int priority)
 {
     flags |= BASSVSTDsp.BASS_UNICODE;
     return(BassVst.BASS_VST_ChannelSetDSPUnicode(chan, dllFile, (int)flags, priority));
 }
Exemple #14
0
 public static bool BASS_VST_SetProgramParam(int vstHandle, int programIndex, float[] param)
 {
     return(param != null && param.Length != 0 && BassVst.BASS_VST_SetProgramParam(vstHandle, programIndex, param, param.Length));
 }