示例#1
0
 static ConnectionEventArgs GetRenamedPortArgs(PortRegistrationEventArgs args, JackPort oldPort)
 {
     ConnectionEventArgs eventArgs = new ConnectionEventArgs {
         MessageType = MessageType.Change
     };
     PortMapper.Remove (oldPort);
     JackPort port = AddNewJackPort (args.Port);
     eventArgs.Connectables = new List<Port> { port };
     eventArgs.ChangeType = ChangeType.Content;
     eventArgs.ConnectionType = port.ConnectionType;
     eventArgs.Message = "Port renamed.";
     return eventArgs;
 }
示例#2
0
 static IConnection MapConnection(JackPort outPort, JackPort inPort)
 {
     IConnection newConn = null;
     switch (outPort.ConnectionType) {
     case ConnectionType.JackAudio:
         newConn = new JackAudioConnection ();
         break;
     case ConnectionType.JackMidi:
         newConn = new JackMidiConnection ();
         break;
     }
     Debug.Assert (newConn != null, "New connection is null.");
     newConn.OutPort = outPort;
     newConn.InPort = inPort;
     return newConn;
 }
示例#3
0
 static JackPort AddNewJackPort(PortReference port)
 {
     JackPort newPort = new JackPort (port);
     PortMapper.Add (newPort);
     return newPort;
 }