コード例 #1
0
ファイル: VSTPlugin.cs プロジェクト: kohoutech/Kohoutech.VST
        //cons
        public VSTPlugin(VSTHost _host, String _filename, int _id)
        {
            host     = _host;
            filename = _filename;
            id       = _id;

            //-1 == not set yet
            audioInIdx  = -1;
            audioOutIdx = -1;

            //get info from plugin
            PluginInfo pluginfo = new PluginInfo();

            getPluginInfo(ref pluginfo);
            name         = pluginfo.name;
            vendor       = pluginfo.vendor;
            version      = pluginfo.version;
            numPrograms  = pluginfo.numPrograms;
            numParams    = pluginfo.numParameters;
            numInputs    = pluginfo.numInputs;
            numOutputs   = pluginfo.numOutputs;
            flags        = pluginfo.flags;
            uniqueID     = pluginfo.uniqueID;
            editorWidth  = pluginfo.editorWidth;
            editorHeight = pluginfo.editorHeight;

            parameters = new VSTParam[numParams];
            for (int i = 0; i < numParams; i++)
            {
                String paramName = getParamName(i);
                float  paramVal  = getParamValue(i);
                parameters[i] = new VSTParam(i, paramName, paramVal);
            }

            if (numPrograms > 0)
            {
                programs = new VSTProgram[numPrograms];
                for (int i = 0; i < numPrograms; i++)
                {
                    String progName = getProgramName(i);
                    programs[i] = new VSTProgram(i, progName);
                }
            }
            else
            {
                //programs = new VSTProgram[1];
                programs = null;
                //programs[0] = new VSTProgram(0, "no programs");
            }
            curProgramNum = 0;
        }
コード例 #2
0
ファイル: Vashti.cs プロジェクト: kohoutech/Kohoutech.VST
 public Vashti()
 {
     VashtiInit();                   //create VashtiB obj in backend
     host = new VSTHost(this);       //create host obj in frontend
 }