2024-06-07 00:47:07 +02:00

43 lines
1.3 KiB
C#

using System;
using System.Runtime.InteropServices;
namespace NAudio.CoreAudioApi.Interfaces
{
/// <summary>
/// IMMNotificationClient
/// </summary>
[Guid("7991EEC9-7E89-4D85-8390-6C703CEC60C0"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
ComImport]
public interface IMMNotificationClient
{
/// <summary>
/// Device State Changed
/// </summary>
void OnDeviceStateChanged([MarshalAs(UnmanagedType.LPWStr)] string deviceId, [MarshalAs(UnmanagedType.I4)] DeviceState newState);
/// <summary>
/// Device Added
/// </summary>
void OnDeviceAdded([MarshalAs(UnmanagedType.LPWStr)] string pwstrDeviceId);
/// <summary>
/// Device Removed
/// </summary>
void OnDeviceRemoved([MarshalAs(UnmanagedType.LPWStr)] string deviceId);
/// <summary>
/// Default Device Changed
/// </summary>
void OnDefaultDeviceChanged(DataFlow flow, Role role, [MarshalAs(UnmanagedType.LPWStr)] string defaultDeviceId);
/// <summary>
/// Property Value Changed
/// </summary>
/// <param name="pwstrDeviceId"></param>
/// <param name="key"></param>
void OnPropertyValueChanged([MarshalAs(UnmanagedType.LPWStr)] string pwstrDeviceId, PropertyKey key);
}
}