如何从特定应用程序捕获音频并路由到 Windows 7 中的特定音频设备?

2021-12-21 00:00:00 windows audio windows-7 c++

好的,我的问题是:

如何以编程方式从特定应用程序捕获音频,然后将其发送到 Windows 7 中的特定音频设备?

How can I programmatically capture audio from a specific application and then send it to a specific audio device in Windows 7?

我知道这是可以做到的,因为 SoundLeech 从单个程序中捕获音频,理论上一旦你有了声音,你就可以用它做你想做的事(包括在任何声音输出设备上播放).

I know for a fact this can be done, since SoundLeech captures audio from individual programs, and theoretically once you have the sound you can do what you want with it (including play it to any sound output device).

我是一名 C++ 程序员,但我对 Windows 编程知之甚少.我需要一些指针来从单个程序中捕获声音.我经常使用录音,鉴于目前使用 Windows 的难度很大,我愿意投入大量工作来开发一种方法来更好地处理 Windows 中的声音.

I'm a C++ programmer but I know very little about Windows programming. I need some pointers to capturing sound from individual programs. I work with audio recording very frequently and I would be willing to put in a large amount of work to develop a way to better handle sound in Windows given how difficult to use it currently is.

那么如何直接从应用程序捕获音频流,而无需先通过虚拟音频电缆或类似设备进行路由?

So how can I capture audio streams directly from applications without first routing them through Virtual Audio Cables or the like?

推荐答案

您无法使用标准用户模式 ??API 来实现.您需要挂钩 API 或创建虚拟设备来接受应用程序流/会话.

You cannot do it using standard user mode APIs. You need to either hook APIs or create virtual devices to accept application streams/sessions.

  • 拦截和后处理 Windows 上的所有音频流
  • 录制特定程序的音频输出在 Windows 上
  • 是是否可以从另一个进程捕获渲染音频会话?
  • 在 Windows 7 上捕获单个应用程序的音频

相关文章