如何获得当前波形输出样本流的访问权限?
在2006年12月关于social.microsoft.com(How to record from ‘Wave’ or ‘Stereo Mix’ in Vista?)的问题中,yjslash问道:
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.
Larry Osterman (MSFT)(音频团队开发和StackOverflow user)回应:
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
Stackoverflow(How do I read system audio output in windows xp and windows 7?)上的一个问题还提到WASAPI能够对输出组合进行采样,并且从Windows Vista开始可以使用它.
A January of 2007 a Windows Team blog条目提到了对音频输出进行采样的能力(出于回声消除的目的;以及HDCP将对其产生的影响):
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.
什么API用于采样音频输出? Vista为访问当前音频输出流提供应用程序的访问权限是什么? WASAPI的功能和使用方法允许对当前音频输出进行采样/捕获?
也可以看看
> Tool for exploring Windows Vista Audio device chain (tree?)
> MSDN: About WASAPI
最佳答案 我在MSDN中找到了
this(
Loopback Recording),也在
this(
Capturing a Stream)找到了.
顺便说一句,根据MSDN,WASAPI将不允许您捕获具有DRM保护的流:
Windows Vista provides digital rights management (DRM). WASAPI does not permit loopback recording of digital streams that contain DRM-protected content. Similarly, a trusted audio driver does not permit a loopback device to capture digital streams that contain protected content. Windows Vista allows only trusted drivers to play protected content. For more information about trusted drivers and DRM, see the Windows DDK documentation.