Windows Vista/7:如何对输出音频混合进行采样?
我怎样才能访问当前的波形输出样本流?
在 2006 年 12 月 Social.microsoft.com 上的问题中(如何从“Wave”或“Stereo Mix”中录制Vista?) yjslash 问道:
在 Windows XP 或更早版本中,我可以将音频流捕获到扬声器。换句话说,DirectSoundCapture 能够从选定的源行进行捕获。如果选择“Wave Out Mix”或“Stereo Mix”或类似的内容作为录音源行,DirectSoundCapture 就能够将音频流录制到扬声器。
Larry Osterman (MSFT)(音频团队开发人员和 StackOverflow 用户)回复:
您在 XP 中为此使用了哪些 API?他们应该继续在 Vista 上工作。
WASAPI 有一个特殊的环回模式,允许客户端捕获后混合音频流,这也可能有所帮助
Stackoverflow 上的一个问题(如何读取 Windows XP 和 Windows 7 中的系统音频输出?)提到 WASAPI 能够对输出混合进行采样,并且从 Windows Vista 开始就可以使用该功能。
2007 年 1 月,Windows 团队博客条目提到了对音频输出进行采样的功能(用于消除回声;以及什么) HDCP对其产生的影响):
回声消除对于优质内容的效果会较差吗?
我们相信 Windows Vista 使应用程序能够访问足够的信息,以成功构建高质量的回声消除功能。
使用什么 API 对音频输出进行采样? Vista 为应用程序提供了哪些访问权限来访问当前的音频输出流? WASAPI 的哪些功能以及如何使用它们允许对当前音频输出进行采样/捕获?
另请参阅
How can i gain access to the current wave output sample stream?
In a December 2006 question on social.microsoft.com (How to record from 'Wave' or 'Stereo Mix' in Vista?) yjslash asked:
On Windows XP or earlier, I could capture the audio stream to the speaker. In other words, DirectSoundCapture was able to capture from the selected source line. And if "Wave Out Mix" or "Stereo Mix" or something similar was selected as recording source line, DirectSoundCapture was able to record the audio stream to the speaker.
To which Larry Osterman (MSFT) (audio team dev and StackOverflow user) responded:
What APIs did you use for this in XP? They should continue to work on Vista.
WASAPI has a special Loopback mode that allows a client to capture the post-mix audio stream, that may help as well
A question on Stackoverflow (How do I read system audio output in windows xp and windows 7?) also mentions that the WASAPI has the ability to sample the output mix, and that it's available starting with Windows Vista.
A January of 2007 a Windows Team blog entry mentions the ability to sample the audio output (for the purposes of echo cancellation; and what effect HDCP will have on it):
Will echo cancellation work less well for premium content?
We believe that Windows Vista provides applications with access to sufficient information to successfully build high quality echo cancellation functionality.
What API is used to sample the audio output? What access does Vista provide applications to do access the current audio output stream? What functions, and how to use them, of the WASAPI allows sampling/capture of the current audio output?
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现这个(环回MSDN 中的记录),以及 这个(捕获流)。
顺便说一下,根据 MSDN 的说法,WASAPI 不允许您捕获具有 DRM 保护的流:
I found this (Loopback Recording) in MSDN, and also this (Capturing a Stream).
By the way, according to MSDN, WASAPI will not allow you to capture streams with DRM protection: