using NAudio.CoreAudioApi.Interfaces; namespace NAudio.CoreAudioApi { /// /// Connector /// public class Connector { private readonly IConnector connectorInterface; internal Connector(IConnector connector) { connectorInterface = connector; } /// /// Connects this connector to a connector in another device-topology object /// public void ConnectTo(Connector other) { connectorInterface.ConnectTo(other.connectorInterface); } /// /// Retreives the type of this connector /// public ConnectorType Type { get { connectorInterface.GetType(out var result); return result; } } /// /// Retreives the data flow of this connector /// public DataFlow DataFlow { get { connectorInterface.GetDataFlow(out var result); return result; } } /// /// Disconnects this connector from it's connected connector (if connected) /// public void Disconnect() { connectorInterface.Disconnect(); } /// /// Indicates whether this connector is connected to another connector /// public bool IsConnected { get { connectorInterface.IsConnected(out var result); return result; } } /// /// Retreives the connector this connector is connected to (if connected) /// public Connector ConnectedTo { get { connectorInterface.GetConnectedTo(out var result); return new Connector(result); } } /// /// Retreives the global ID of the connector this connector is connected to (if connected) /// public string ConnectedToConnectorId { get { connectorInterface.GetConnectorIdConnectedTo(out var result); return result; } } /// /// Retreives the device ID of the audio device this connector is connected to (if connected) /// public string ConnectedToDeviceId { get { connectorInterface.GetDeviceIdConnectedTo(out var result); return result; } } public Part Part { get { return new Part(connectorInterface as IPart); } } } }