IMMNotificationClient questions

Mar 18 at 1:23 PM
Edited Mar 18 at 1:24 PM

I've recently been trying to detect the insertion and removal of USB headsets, and after reading the Microsoft documentation on IMMDeviceEnumerator, IMMNotificationClient and IMMDevice I've tweaked the MMDeviceEnumerator class in the NAudio class to include the Register and Unregister endpoint notification callback methods and created a MMNotificationClient.

I'm successfully received OnDevicestateChanged events in my MMNotificationClient, however I keep getting two callbacks everytime a USB headset is inserted or removed with different device IDs, For example:

1st event) {}.{8d7fb07d-40e8-49d9-81a8-749f5abd25db}
2nd event) {}.{8213efcc-fe5d-42f8-ae6e-0c3053be5141}

Now I am aware that the CoreAudioApi code was written by Ray Molenkamp, but I'm not sure how to contact him and was hoping that maybe someone would have an idea about unmanaged code, and why I could possibly keep getting 2 callbacks rather than 1.