设置 MediaElement 或 MediaPlayer 的输出设备

发布于 2024-09-29 19:19:00 字数 145 浏览 2 评论 0原文

MediaElement 或 MediaPlayer 无疑是在 .net 应用程序中播放音乐的好方法。 我不知道该怎么做的一件事是如何设置播放设备。有没有办法做到这一点,或者它总是默认为标准音频设备(因为它来自网络应用程序)。

预先感

谢马里奥

MediaElement or MediaPlayer is sure a great way to play music within a .net application.
One thing I could not find out how to do is how to set the playback device. Is there a way to do it or does it always default to the standard audio device (since it comes from the web application).

Thanks in advance

Mario

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧情勿念 2024-10-06 19:19:00

它将始终使用默认声音设备。我不认为 WPF 支持开箱即用的输出到另一个设备的方法。为此,您必须降低 DirectSound 的级别。幸运的是,DirectX 有很多很棒的托管包装器,我可以推荐的一个是 SlimDX

It will always use the default sound device. I don't believe WPF supports a way to output to another device out of the box. For that, you will have to go a little lower level to DirectSound. Fortunately, there are a lot of great managed wrappers around DirectX, one I can recommend is SlimDX.

画尸师 2024-10-06 19:19:00

Bass.net 是一个非常强大的音频 API,它可以让您做到这一点并设置频道。不幸的是它不是免费的。 (不,我不为他们工作)

您还可以使用 direct-x SDK 设置声音设备并集成音频/视频。

Bass.net is a very powerful audio api which will let you do that and also set channels. Unfortunately it is not free. (no, I don't work for them)

You can also use the direct-x SDK to set sound device and integrate audio / video.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文