T
TudorCiucas
Guest
Hi,
I have a C++ desktop app which implements IMMNotificationClient interface and its OnDefaultDeviceChanged method. The problem is that when I disconnect the default device (audio device with usb connection) another device will be set as default. But OnDefaultDeviceChanged is called too many times. At least two times (one time for playback device and another time for a recording device) with incorrect deviceID. I need this deviceID to further call GetDevice from IMMDeviceEnumerator. And because those IDs are wrong, GetDevice fails. Is there a solution for this? or triage the amount of calls this callback is called?
Continue reading...
I have a C++ desktop app which implements IMMNotificationClient interface and its OnDefaultDeviceChanged method. The problem is that when I disconnect the default device (audio device with usb connection) another device will be set as default. But OnDefaultDeviceChanged is called too many times. At least two times (one time for playback device and another time for a recording device) with incorrect deviceID. I need this deviceID to further call GetDevice from IMMDeviceEnumerator. And because those IDs are wrong, GetDevice fails. Is there a solution for this? or triage the amount of calls this callback is called?
Continue reading...