在 c++ 中通过麦克风播放声音
我正在为 Windows XP 使用 C++ 编写一个程序,该程序需要播放声音,以便当前正在录制麦克风的任何程序都可以听到它,但它不会从扬声器中发出。似乎没有“真正”的方法来做到这一点,但可以进入“sndvol32 -R”并将 Wave out mix 或类似的当前输入设备设置为。然后,您可以将主音量调至 0,播放声音,再调高,并将输入设备重置为麦克风。有没有一种方法可以透明地执行此操作,或者使用函数设置当前输入设备,这样您就不必看到 sndvol32 弹出?
谢谢
I am making a program in C++ for Windows XP that requires sound to be played so that any program that is currently recording the microphone can hear it, but it will not come out of the speakers. There seems to be no "real" way of doing it, but it is possible to go into "sndvol32 -R" and set the Wave out mix or similar as the current input device. Then you can turn the master volume to 0, play the sound, turn it back up, and reset the input device to the microphone. Is there a way of doing this transparently, or setting the current input device using functions, so that you dont have to see sndvol32 pop up?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这样做需要复杂的内核级驱动程序。
对你来说幸运的是,有人已经做到了这一点(它不是免费的,但它是一个很棒的程序)。
Doing this would require a complicated kernel-level driver.
Fortunately for you, someone has already done this (it's not free, but it's a fantastic program).