1
votes

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!

1

1 Answers

0
votes

However, when I mute the computer, or slide the volume up or down, the volume of the recording does not change.

Volume Controls

As explained in Audio Sessions, Sndvol is the system volume-control program. It displays volume controls for the audio-rendering endpoint devices in the system. (Currently, it does not display the volume controls for audio-capture endpoint devices.) To view the volume controls for a particular device, click Device in the menu bar and select a device name from the list of available devices.

Perhaps the problem is here. You mute the audio rendering, not audio capture.