Port for client to contain data to process.
Inheritance: IDisposable
Beispiel #1
0
 internal AudioBuffer(Port port, uint bufferSize, StructPointer<float> pointer)
 {
     BufferSize = (int)bufferSize;
     Port = port;
     PointerWrapper = pointer;
     Audio = PointerWrapper.Array;
 }
Beispiel #2
0
 internal static bool Connect(Port outputPort, Port inputPort)
 {
     if (outputPort.FlowDirection != FlowDirection.Out
         || inputPort.FlowDirection != FlowDirection.In
         || outputPort.ConnectionType != inputPort.ConnectionType) {
         return false;
     }
     JackPort outPort = PortMapper.First (map => map == outputPort);
     JackPort inPort = PortMapper.First (map => map == inputPort);
     return _jackClient.Connect (outPort.PortReference, inPort.PortReference);
 }
Beispiel #3
0
 internal static bool Disconnect(Port outputPort, Port inputPort)
 {
     if (outputPort.FlowDirection != FlowDirection.Out || inputPort.FlowDirection != FlowDirection.In || outputPort.ConnectionType != inputPort.ConnectionType) {
         return false;
     }
     JackPort outPort = PortMapper.First (map => map == outputPort);
     JackPort inPort = PortMapper.First (map => map == inputPort);
     if (_connections.Any (c => c.InPort == inputPort && c.OutPort == outputPort)) {
         return _jackClient.Disconnect (outPort.PortReference, inPort.PortReference);
     }
     return true;
 }
Beispiel #4
0
 /// <summary>
 /// Determines whether the specified <see cref="JackSharp.Ports.Port"/> is equal to the current <see cref="JackSharp.Ports.Port"/>.
 /// </summary>
 /// <param name="other">The <see cref="JackSharp.Ports.Port"/> to compare with the current <see cref="JackSharp.Ports.Port"/>.</param>
 /// <returns><c>true</c> if the specified <see cref="JackSharp.Ports.Port"/> is equal to the current
 /// <see cref="JackSharp.Ports.Port"/>; otherwise, <c>false</c>.</returns>
 public bool Equals(Port other)
 {
     if (other == null)
         return false;
     unsafe {
         return _port == other._port && _jackClient == other._jackClient;
     }
 }