C 语言中的 Windows 虚拟麦克风 [英] Windows virtual microphone in C

查看:64
本文介绍了C 语言中的 Windows 虚拟麦克风的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我前段时间问过一个类似的问题,但我不是很了解,所以我无法说得足够具体.

I asked a similar question a while ago but I didn't know very much, so I wasn't able to be specific enough.

我想编写一个程序,从我的麦克风获取输入,处理它,然后将输出发送到一个假的虚拟麦克风",就好像我创建的处理过的声音是麦克风听到的一样.然后,我希望能够将此虚拟麦克风与支持选择麦克风输入(几乎任何编写良好的软件)作为有效麦克风的任何应用程序一起使用.所以应用程序听到"的是我对麦克风输入的处理版本.

I want to write a program that takes input from my microphone, processes it, and then sends the output to a fake "virtual microphone" as if the processed sound I created was what a microphone was hearing. I would then like to be able to use this virtual microphone with any application that supports choosing your microphone input (pretty much any well written software) as a valid microphone. So what the application "hears" will be my processed version of the microphone input.

我在 C 语言中使用 Portaudio,我可以从麦克风中捕获、处理并发送到扬声器就好了.现在我需要用假麦克风替换应用程序中的真实扬声器.Windows 似乎为此提供了一些 API.http://msdn.microsoft.com/en-us/library/windows/hardware/ff536201%28v=vs.85%29.aspx所以我的接收器引脚将是真正的麦克风,我将不得不创建一个新的源引脚,它应该对其他应用程序可见.我该怎么做呢?我很难找到代码示例,甚至很难找到任何内容丰富的文档.

I'm working with Portaudio in C and I can capture from the mic, process, and send out to the speakers just fine. Now I need to replace my real speakers in the application with the phony microphone. Windows seems to have some APIs for this. http://msdn.microsoft.com/en-us/library/windows/hardware/ff536201%28v=vs.85%29.aspx So my sink pin will be the real microphone and I will have to create a NEW source pin that should be visible to other applications. How would I go about doing this? I'm having difficulty finding code samples or really even any very informative documentation.

语言:C操作系统:Windows 7

Language: C OS: Windows 7

推荐答案

为此可以使用 Windows Stereo Mix.然后就可以在环回模式下打开虚拟设备,用编程记录麦克风听到的内容

It is possible to use the Windows Stereo Mix for that. Then you can open the virtual device in loopback mode and record what the microphone hears with programming

这篇关于C 语言中的 Windows 虚拟麦克风的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆