Пример #1
0
 /// <summary>
 /// Close a MIDI connection.
 /// </summary>
 /// <param name="device">Device to close</param>
 internal static void ClosePort(RtMidiPtr device)
 {
     if (Is64Bit)
     {
         RtMidiC64.ClosePort(device);
     }
     else
     {
         RtMidiC32.ClosePort(device);
     }
 }
Пример #2
0
 /// <summary>
 /// Open a MIDI port.
 /// </summary>
 /// <param name="device">Device</param>
 /// <param name="portNumber">Must be greater than 0</param>
 /// <param name="portName">Name for the application port.x</param>
 internal static void OpenPort(RtMidiPtr device, uint portNumber, string portName)
 {
     if (Is64Bit)
     {
         RtMidiC64.OpenPort(device, portNumber, portName);
     }
     else
     {
         RtMidiC32.OpenPort(device, portNumber, portName);
     }
 }
Пример #3
0
 /// <summary>
 /// Creates a virtual MIDI port to which other software applications can
 /// connect.
 /// </summary>
 /// <param name="device">Device</param>
 /// <param name="portName"> Name for the application port.</param>
 internal static void OpenVirtualPort(RtMidiPtr device, string portName)
 {
     if (Is64Bit)
     {
         RtMidiC64.OpenVirtualPort(device, portName);
     }
     else
     {
         RtMidiC32.OpenVirtualPort(device, portName);
     }
 }
Пример #4
0
 /// <summary>
 /// Report an error.
 /// </summary>
 internal static void Error(RtMidiErrorType type, string errorString)
 {
     if (Is64Bit)
     {
         RtMidiC64.Error(type, errorString);
     }
     else
     {
         RtMidiC32.Error(type, errorString);
     }
 }
Пример #5
0
 /// <summary>
 /// Determine the available compiled MIDI APIs.
 /// If the given `apis` parameter is null, returns the number of available APIs.
 /// Otherwise, fill the given apis array with the RtMidi::Api values.
 /// </summary>
 /// <param name="apis">An array or a null value.</param>
 internal static int GetCompiledApi(IntPtr /* RtMidiApi * */ apis) => Is64Bit
     ? RtMidiC64.GetCompiledApi(apis)
     : RtMidiC32.GetCompiledApi(apis);
Пример #6
0
 /// <summary>
 /// Return a string identifier for the specified MIDI input port number.
 /// </summary>
 /// <param name="device">Device</param>
 /// <param name="portNumber">Port number</param>
 internal static string GetPortName(RtMidiPtr device, uint portNumber) => Is64Bit
     ? RtMidiC64.GetPortName(device, portNumber)
     : RtMidiC32.GetPortName(device, portNumber);
Пример #7
0
 /// <summary>
 /// Return the number of available MIDI ports.
 /// </summary>
 /// <param name="device">Device</param>
 internal static uint GetPortCount(RtMidiPtr device) => Is64Bit
     ? RtMidiC64.GetPortCount(device)
     : RtMidiC32.GetPortCount(device);
Пример #8
0
 /// <summary>
 /// Determine the available compiled MIDI APIs.
 /// If the given `apis` parameter is null, returns the number of available APIs.
 /// Otherwise, fill the given apis array with the RtMidi::Api values.
 /// </summary>
 /// <param name="apis">An array or a null value.</param>
 /// <param name="apisSize">Number of elements pointed to by <paramref name="apis"/></param>
 internal static int GetCompiledApi(IntPtr /* RtMidiApi * */ apis, uint apisSize) => Is64Bit
     ? RtMidiC64.GetCompiledApi(apis, apisSize)
     : RtMidiC32.GetCompiledApi(apis, apisSize);