我正在将WASAPI与回送捕获模式一起使用,以记录Windows 10笔记本电脑声卡的音频。我在这里遵循了示例:https://docs.microsoft.com/en-us/windows/win32/coreaudio/capturing-a-stream,它可以完美运行。
但是,当我使计算机静音或向上或向下滑动音量时,录音的音量不会改变。我希望它相应地更改并相应地静音,而不是总是播放。我已经研究过通过Activate函数(https://docs.microsoft.com/en-us/windows/win32/api/mmdeviceapi/nf-mmdeviceapi-immdevice-activate)将IAudioEndpointVolume添加到我的IMM_Device(已经通过IAudioClient3激活了),但是代码现在在Initialize调用时崩溃。
有人能做到吗?关于从现在起去哪里有什么建议?
非常感谢!
最佳答案
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.
也许问题出在这里。您静音音频渲染,而不是音频捕获。
关于c++ - 修改系统卷后如何修改WASAPI回送捕获卷?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60358070/