Table of Contents

Class MMDevice

Namespace
NAudio.CoreAudioApi
Assembly
NAudio.Wasapi.dll

A single Core Audio endpoint (IMMDevice) — render or capture, and one of the four DeviceState values. Provides access to the property store, session manager, endpoint volume, peak meter, device topology, and audio clients. Obtain instances from MMDeviceEnumerator.

public class MMDevice : IDisposable
Inheritance
MMDevice
Implements
Inherited Members

Properties

AudioClient

Audio Client — creates a new instance per call. Caller must dispose.

[Obsolete("Use CreateAudioClient() instead — this property creates a new instance on every access, which is misleading.")]
public AudioClient AudioClient { get; }

Property Value

AudioClient

AudioEndpointVolume

Audio Endpoint Volume

public AudioEndpointVolume AudioEndpointVolume { get; }

Property Value

AudioEndpointVolume

AudioMeterInformation

Audio Meter Information

public AudioMeterInformation AudioMeterInformation { get; }

Property Value

AudioMeterInformation

AudioSessionManager

AudioSessionManager instance

public AudioSessionManager AudioSessionManager { get; }

Property Value

AudioSessionManager

DataFlow

Data Flow

public DataFlow DataFlow { get; }

Property Value

DataFlow

DeviceFriendlyName

Friendly name of device

public string DeviceFriendlyName { get; }

Property Value

string

DeviceTopology

DeviceTopology instance

public DeviceTopology DeviceTopology { get; }

Property Value

DeviceTopology

FriendlyName

Friendly name for the endpoint

public string FriendlyName { get; }

Property Value

string

ID

Device ID

public string ID { get; }

Property Value

string

IconPath

Icon path of device

public string IconPath { get; }

Property Value

string

InstanceId

Device Instance Id of Device

public string InstanceId { get; }

Property Value

string

Properties

Properties

public PropertyStore Properties { get; }

Property Value

PropertyStore

State

Device State

public DeviceState State { get; }

Property Value

DeviceState

Methods

CreateAudioClient()

Creates a new AudioClient for this device. Each call creates a new instance; the caller is responsible for disposing it.

public AudioClient CreateAudioClient()

Returns

AudioClient

Dispose()

Dispose

public void Dispose()

GetPropertyInformation(StorageAccessMode)

Initializes the device's property store.

public void GetPropertyInformation(StorageAccessMode stgmAccess = StorageAccessMode.Read)

Parameters

stgmAccess StorageAccessMode

The storage-access mode to open store for.

Remarks

Administrative client is required for Write and ReadWrite modes.

ToString()

To string

public override string ToString()

Returns

string