Ejemplo n.º 1
0
        public int GetMidiProgramCategory(VstMidiProgramCategory midiCat, int channel)
        {
            if (_commands != null)
            {
                return(_commands.GetMidiProgramCategory(midiCat, channel));
            }

            return(0);
        }
Ejemplo n.º 2
0
        public void Test_MaxLength_VstMidiProgramCategory_Name()
        {
            VstMidiProgramCategory mpc = new VstMidiProgramCategory();

            Assert.AreEqual(null, mpc.Name);

            mpc.Name = String.Empty;
            Assert.AreEqual(String.Empty, mpc.Name);

            string testData = CreateString(Constants.MaxMidiNameLength);

            mpc.Name = testData;
            Assert.AreEqual(testData, mpc.Name);

            testData += "X";
            mpc.Name  = testData;
            Assert.Fail("should have thrown an exception.");
        }
Ejemplo n.º 3
0
        public void Test_MaxLength_VstMidiProgramCategory_Name()
        {
            var mpc = new VstMidiProgramCategory();

            mpc.Name.Should().BeEmpty();

            mpc.Name = String.Empty;
            mpc.Name.Should().BeEmpty();

            string testData = CreateString(Constants.MaxMidiNameLength);

            mpc.Name = testData;
            mpc.Name.Should().Be(testData);

            testData += "X";
            mpc.Name  = testData;
            Assert.Fail("should have thrown an exception.");
        }
Ejemplo n.º 4
0
 /// <summary>
 /// This call is forwarded to the <see cref="Jacobi.Vst.Core.Plugin.IVstPluginCommandStub"/> implementation.
 /// </summary>
 /// <param name="midiCat">Passed with the forwarded call.</param>
 /// <param name="channel">Passed with the forwarded call.</param>
 /// <returns>Returns the value returned from the forwarded call.</returns>
 public int GetMidiProgramCategory(VstMidiProgramCategory midiCat, int channel)
 {
     return(_pluginCmdStub.GetMidiProgramCategory(midiCat, channel));
 }
Ejemplo n.º 5
0
        public override int GetMidiProgramCategory(VstMidiProgramCategory midiCat, int channel)
        {
            LogMethod(MethodBase.GetCurrentMethod());

            return(base.GetMidiProgramCategory(midiCat, channel));
        }
Ejemplo n.º 6
0
 public int GetMidiProgramCategory(VstMidiProgramCategory midiCat, int channel)
 {
     throw new NotImplementedException();
 }
        /// <summary>
        /// Retrieves information about a Midi Program Category.
        /// </summary>
        /// <param name="midiCat">Must not be null.</param>
        /// <param name="channel">The zero-based Midi channel.</param>
        /// <returns>Returns the total number of Midi program categories.</returns>
        public virtual int GetMidiProgramCategory(VstMidiProgramCategory midiCat, int channel)
        {
            IVstPluginMidiPrograms midiPrograms = pluginCtx.Plugin.GetInstance<IVstPluginMidiPrograms>();

            if (midiPrograms != null)
            {
                VstMidiChannelInfo channelInfo = midiPrograms.ChannelInfos[channel];
                VstMidiCategory progCat = channelInfo.Categories[midiCat.CurrentCategoryIndex];

                midiCat.Name = progCat.Name;
                midiCat.ParentCategoryIndex = progCat.ParentCategory != null ? channelInfo.Categories.IndexOf(progCat.ParentCategory) : -1;

                return channelInfo.Categories.Count;
            }

            return 0;
        }
 public int GetMidiProgramCategory(VstMidiProgramCategory midiCat, int channel)
 {
     return 0;
 }
Ejemplo n.º 9
0
 /// <inheritdoc />
 public int GetMidiProgramCategory(VstMidiProgramCategory midiCat, int channel)
 {
     Log("GetMidiProgramCategory: " + channel);
     return(0);
 }