捕获扬声器输出 [英] Capture speaker output

查看:41
本文介绍了捕获扬声器输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到我可以使用 Windows.Media.Audio 命名空间.不过,我希望捕获扬声器输出.例如,我点击某个东西,系统会发出警报声 - 我希望能够捕捉到它.

I've seen that I can capture the microphone and sound-files with elements in the Windows.Media.Audio namespace. I'm looking to capture the speaker output, though. For example, I click on something and the system sounds the alert sound - I want to be able to capture that.

有没有办法使用 Windows.Media.Audio 中的元素来做到这一点(而不是进入更底层的 Win32 调用)?

Is there any way of doing that using elements in Windows.Media.Audio (instead of going more low level into Win32 calls)?

推荐答案

好吧,即使使用低级别 Win32 调用",您也无法在 UWP 中进行任何环回录制.

Well, even with "low level Win32 calls", you can't do any loopback recording in UWP.

这在传统上是通过 WASAPI 完成的,但由于通用应用程序的沙盒执行,您无法在 WASAPI 的音频渲染设备上打开任何捕获流.

This is traditionally done with WASAPI, but due to the sandboxed execution of universal applications, you can't open any capture streams on audio render devices in WASAPI.

一般来说,如果您深入研究已移植到 UWP 的 COM API,您会注意到存在很多限制.

In general, if you dive into COM APIs which have been ported to UWP, you will notice that there have been a lot of restrictions.

这篇关于捕获扬声器输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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