In 2007, during the fever over DRM being included in Windows Vista, a Windows Vista Team blog was created to respond to a lot of the concerns. One of the questions responded to the ability of VoIP software to perform echo cancellation when running on Windows Vista.
This is what Nick White had to say by way of an FAQ:
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 information does Windows Vista provide to allow applications to build high quality echo cancellation functionality?
Note: Reading that statement, i get the impression that Windows Vista provides sufficient information to allow applications to successfully build high-quality echo cancellation functionality. Presumably the way Windows provides this information is through an API.
Echo cancellation works by sampling the playing output, and "subtracting it" from the recorded microphone input.
Unfortunately, as MSDN notes, one cannot always sample playing output:
Windows Vista provides digital rights management (DRM). Content providers rely on DRM to protect their proprietary music or other content from unauthorized copying and other illegal uses. 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.
Presumably that means that using Loopback Mode from WASAPI is not the intended method to provide echo-cancellation services.
What is the intended API to allow the implementation of high quality echo cancellation?
Note: This is related to, but separate from, another question i asked: How to sample output audio mix?. This question is specifically looking for an expansion of the response by the Window Vista team that echo-cancellation is possible in Windows. This question is looking for the API; it can be a separate question of how to use it.
Googling for an answer, i get the impression that (while performing echo-cancellation) an application is allowed to sample DRM protected content, but the content will be degraded (i.e. "sufficient information"). This would make any echo-cancellation worse, but still possible.
Or was the Windows team implying "sufficient for most cases, but not while the user is listening to a song or playing a movie" - and that it is in fact not possible to successfully build high quality echo cancellation functionality?
Update: It should be noted i'm not looking for an echo-cancellation API, i'm looking for an API to sample the playing output - which is what's required to implement echo cancellation. Unless of course Windows Vista provides an echo-cancellation API (which is how they continue to protect Premium content). But i've not seen an echo-cancellation API either.
http://msdn.microsoft.com/en-us/library/ff819492(v=VS.85).aspx
If you are looking for an API to do echo cancellation, it looks like the voice capture dsp has built in support for acoustic echo cancellation.
Example: http://msdn.microsoft.com/en-us/library/dd443455(VS.85).aspx
精彩评论