I'm using WASAPI with loopback capture mode to record the audio of my Windows 10 laptop soundcard. I followed the example here: https://docs.microsoft.com/en-us/windows/win32/coreaudio/capturing-a-stream and it works perfectly.
However, when I mute the computer, or slide the volume up or down, the volume of the recording does not change. I would like it to change accordingly and be muted accordingly, instead of always playing. I've looked into adding a IAudioEndpointVolume via the Activate function (https://docs.microsoft.com/en-us/windows/win32/api/mmdeviceapi/nf-mmdeviceapi-immdevice-activate) to my IMM_Device (which already gets Activate with IAudioClient3), but the code now crashes at the Initialize call.
Has anyone been able to do that? Any advices on where to go from now?
Thanks a lot!