public class MMNotificationClient : IMMNotificationClient, IDisposable
The MMNotificationClient object provides notifications when an audio endpoint device is added or removed, when the state or properties of an endpoint device change, or when there is a change in the default role assigned to an endpoint device.
DefaultDeviceChanged
Occurs when the default audio endpoint device for a particular device role has changed.
public DefaultDeviceChanged
DeviceAdded
Occurs when a new audio endpoint device has been added.
public DeviceAdded
DevicePropertyChanged
Occurs when the value of a property belonging to an audio endpoint device has changed.
public DevicePropertyChanged
DeviceRemoved
Occurs when an audio endpoint device has been removed.
public DeviceRemoved
DeviceStateChanged
Occurs when the state of an audio endpoint device has changed.
public DeviceStateChanged
MMNotificationClient()
Initializes a new instance of the MMNotificationClient class.
public void MMNotificationClient()
MMNotificationClient(MMDeviceEnumerator enumerator)
Initializes a new instance of the MMNotificationClient class based on an existing MMDeviceEnumerator.
public void MMNotificationClient(MMDeviceEnumerator enumerator)
Parameters
enumerator
MMDeviceEnumeratorDispose()
Disposes und unregisters the MMNotificationClient.
public void Dispose()
Remarks
In order to unregister the MMNotificationClient, this method calls the UnregisterEndpointNotificationCallback method.
Finalize()
Finalizes an instance of the MMNotificationClient class.
protected void Finalize()
OnDefaultDeviceChanged(DataFlow dataFlow, Role role, String deviceId)
The OnDefaultDeviceChanged method notifies the client that the default audio endpoint device for a particular device role has changed.
none Int32 OnDefaultDeviceChanged(DataFlow dataFlow, Role role, String deviceId)
Parameters
dataFlow
DataFlowThe data-flow direction of the endpoint device.
role
RoleThe device role of the audio endpoint device.
deviceId
StringThe device id that identifies the audio endpoint device.
Returns
HRESULT
OnDeviceAdded(String deviceId)
The OnDeviceAdded method indicates that a new audio endpoint device has been added.
none Int32 OnDeviceAdded(String deviceId)
Parameters
deviceId
StringThe device id that identifies the audio endpoint device.
Returns
HRESULT
OnDeviceRemoved(String deviceId)
The OnDeviceRemoved method indicates that an audio endpoint device has been removed.
none Int32 OnDeviceRemoved(String deviceId)
Parameters
deviceId
StringThe device id that identifies the audio endpoint device.
Returns
HRESULT
OnDeviceStateChanged(String deviceId, DeviceState deviceState)
The OnDeviceStateChanged method indicates that the state of an audio endpoint device has changed.
none Int32 OnDeviceStateChanged(String deviceId, DeviceState deviceState)
Parameters
deviceId
StringThe device id that identifies the audio endpoint device.
deviceState
DeviceStateSpecifies the new state of the endpoint device.
Returns
HRESULT
OnPropertyValueChanged(String deviceId, PropertyKey key)
The OnPropertyValueChanged method indicates that the value of a property belonging to an audio endpoint device has changed.
none Int32 OnPropertyValueChanged(String deviceId, PropertyKey key)
Parameters
deviceId
StringThe device id that identifies the audio endpoint device.
key
PropertyKeyThe PropertyKey that specifies the changed property.
Returns
HRESULT