using NAudio.CoreAudioApi.Interfaces;
using System;
using System.Collections.Generic;
using System.Text;
namespace NAudio.CoreAudioApi
{
///
/// Windows CoreAudio DeviceTopology
///
public class DeviceTopology
{
private readonly IDeviceTopology deviceTopologyInterface;
internal DeviceTopology(IDeviceTopology deviceTopology)
{
deviceTopologyInterface = deviceTopology;
}
///
/// Retrieves the number of connections associated with this device-topology object
///
public uint ConnectorCount
{
get
{
deviceTopologyInterface.GetConnectorCount(out var count);
return count;
}
}
///
/// Retrieves the connector at the supplied index
///
public Connector GetConnector(uint index)
{
deviceTopologyInterface.GetConnector(index, out var connectorInterface);
return new Connector(connectorInterface);
}
///
/// Retrieves the device id of the device represented by this device-topology object
///
public string DeviceId
{
get
{
deviceTopologyInterface.GetDeviceId(out var result);
return result;
}
}
}
}