沒有類型庫來保存關於MMDevice API接口的信息。本機代碼的應用程序使用的定義這些接口的Windows SDK頭,而C#應用程序必須有自己的私人代碼定義,如在n音訊源,IAudioClient.cs:
namespace NAudio.CoreAudioApi.Interfaces
{
/// <summary>
/// n.b. WORK IN PROGRESS - this code will probably do nothing but crash at the moment
/// Defined in AudioClient.h
/// </summary>
[Guid("1CB9AD4C-DBFA-4c32-B178-C2F568A703B2"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
internal interface IAudioClient
{
[PreserveSig]
int Initialize(AudioClientShareMode shareMode,
AudioClientStreamFlags StreamFlags,
long hnsBufferDuration, // REFERENCE_TIME
long hnsPeriodicity, // REFERENCE_TIME
[In] WaveFormat pFormat,
[In] ref Guid AudioSessionGuid);