Code: Select all
// Handle auto-assign channels
if(Machine.Attributes[2].Value == 1)
{
   for (int i = 0; i < Patch.NumInputs; i++)
   {
      if (!InputConnections.ContainsValue(i))
      {
         c.DestinationChannel = i; // Not allowed
         break;
      }
   }
}