Methods (12) Properties (1)
Namespace: CSCore.CoreAudioAPI

Syntax

public class MMDeviceEnumerator : ComObject

Base Type

Summary

Provides methods for enumerating multimedia device resources.

Uses

Used by

Methods

MMDeviceEnumerator()

Initializes a new instance of the MMDeviceEnumerator class.

public void MMDeviceEnumerator()

DefaultAudioEndpoint(DataFlow dataFlow, Role role)

Returns the default audio endpoint for the specified data-flow direction and role.

public static MMDevice DefaultAudioEndpoint(DataFlow dataFlow, Role role)

Parameters

dataFlow

DataFlow

The data-flow direction for the endpoint device.

role

Role

The role of the endpoint device.

Returns

MMDevice instance of the endpoint object for the default audio endpoint device.

EnumAudioEndpoints(DataFlow dataFlow, DeviceState stateMask)

Generates a collection of audio endpoint devices that meet the specified criteria.

public MMDeviceCollection EnumAudioEndpoints(DataFlow dataFlow, DeviceState stateMask)

Parameters

dataFlow

DataFlow

The data-flow direction for the endpoint device.

stateMask

DeviceState

The state or states of the endpoints that are to be included in the collection.

Returns

MMDeviceCollection which contains the enumerated devices.

EnumAudioEndpointsNative(DataFlow dataFlow, DeviceState stateMask, IntPtr& collection)

Generates a collection of audio endpoint devices that meet the specified criteria.

public Int32 EnumAudioEndpointsNative(DataFlow dataFlow, DeviceState stateMask, IntPtr& collection)

Parameters

dataFlow

DataFlow

The data-flow direction for the endpoint device.

stateMask

DeviceState

The state or states of the endpoints that are to be included in the collection.

collection

IntPtr&

A pointer variable into which the method writes the address of the MMDeviceCollection COM object of the device-collection object.

Returns

HRESULT

GetDefaultAudioEndpoint(DataFlow dataFlow, Role role)

Returns the default audio endpoint for the specified data-flow direction and role.

public MMDevice GetDefaultAudioEndpoint(DataFlow dataFlow, Role role)

Parameters

dataFlow

DataFlow

The data-flow direction for the endpoint device.

role

Role

The role of the endpoint device.

Returns

MMDevice instance of the endpoint object for the default audio endpoint device.

GetDefaultAudioEndpointNative(DataFlow dataFlow, Role role, IntPtr& device)

The GetDefaultAudioEndpoint method retrieves the default audio endpoint for the specified data-flow direction and role.

public Int32 GetDefaultAudioEndpointNative(DataFlow dataFlow, Role role, IntPtr& device)

Parameters

dataFlow

DataFlow

The data-flow direction for the endpoint device.

role

Role

The role of the endpoint device.

device

IntPtr&

A pointer variable into which the method writes the address of the MMDevice COM object of the endpoint object for the default audio endpoint device.

Returns

HRESULT

GetDevice(String id)

Retrieves an audio endpoint device that is identified by an endpoint ID string.

public MMDevice GetDevice(String id)

Parameters

id

String

Endpoint ID. The caller typically obtains this string from the DeviceID property or any method of the IMMNotificationClient.

Returns

MMDevice instance for specified device.

GetDeviceNative(String id, IntPtr& device)

Retrieves an audio endpoint device that is identified by an endpoint ID string.

public Int32 GetDeviceNative(String id, IntPtr& device)

Parameters

id

String

Endpoint ID. The caller typically obtains this string from the DeviceID property or any method of the IMMNotificationClient.

device

IntPtr&

A pointer variable into which the method writes the address of the IMMDevice interface for the specified device. Through this method, the caller obtains a counted reference to the interface.

Returns

HREUSLT

RegisterEndpointNotificationCallback(IMMNotificationClient notificationClient)

Registers a client's notification callback interface.

public void RegisterEndpointNotificationCallback(IMMNotificationClient notificationClient)

Parameters

notificationClient

IMMNotificationClient

Implementation of the IMMNotificationClient which is should receive the notificaitons.

public Int32 RegisterEndpointNotificationCallbackNative(IMMNotificationClient notificationClient)

Parameters

notificationClient

IMMNotificationClient

Implementation of the IMMNotificationClient which is should receive the notificaitons.

Returns

HRESULT

UnregisterEndpointNotificationCallback(IMMNotificationClient notificationClient)

Deletes the registration of a notification interface that the client registered in a previous call to the RegisterEndpointNotificationCallback method.

public void UnregisterEndpointNotificationCallback(IMMNotificationClient notificationClient)

Parameters

notificationClient

IMMNotificationClient

Implementation of the IMMNotificationClient which should be unregistered from any notifications.

UnregisterEndpointNotificationCallbackNative(IMMNotificationClient notificationClient)

Deletes the registration of a notification interface that the client registered in a previous call to the RegisterEndpointNotificationCallback method.

public Int32 UnregisterEndpointNotificationCallbackNative(IMMNotificationClient notificationClient)

Parameters

notificationClient

IMMNotificationClient

Implementation of the IMMNotificationClient which should be unregistered from any notifications.

Returns

HRESULT

Properties

Item

Gets the MMDevice with the specified device id.

public MMDevice Item { get; }

Parameters

deviceId

The device identifier.