简体   繁体   English

将应用程序声音发送到特定的音频设备C#

[英]Send application sound to a specific audio device C#

Is there a possible way to make an application send sound to a specific sound device? 有没有可能使应用程序将声音发送到特定声音设备的方法?

For example: 例如:

I have a computer with its own speakers, and two HDMI TV. 我有一台带有自己的扬声器和两台HDMI电视的计算机。 Have 3 Google Chrome windows and they have their own sounds, but I want that one window play his sounds on one HDMI device, the other window on the other HDMI device, and the other window in the PC. 有3个Google Chrome窗口,它们都有自己的声音,但是我希望一个窗口在一个HDMI设备上播放他的声音,在另一个HDMI设备上播放另一个窗口,在PC上另一个窗口播放声音。

I have been looking for some libraries but they only allow to play sounds on a specific device not to listen to an application. 我一直在寻找一些库,但它们只允许在特定设备上播放声音而不收听应用程序。

If you want to affect existing application behavior, then your question is for SuperUser rather than StackOverflow. 如果您想影响现有的应用程序行为,那么您的问题是针对SuperUser而不是StackOverflow。

If you are interested in achieving mentioned in code, programmatically, then your app can certainly do it. 如果您有兴趣以编程方式实现代码中提到的内容,那么您的应用程序肯定可以做到。 Any Windows audio API has output device enumeration functions and selection of device to output to. 任何Windows音频API都具有输出设备枚举功能和选择要输出到的设备。 Many apps just pick default device without taking a trouble to choose among existing ones. 许多应用只是选择默认设备,而不会在现有设备中进行选择。 That is, the application itself needs to be capable of choosing specific audio output device, it's not something user sets up externally: Control Panel only allows to select default audio output device, system wide. 也就是说,应用程序本身必须能够选择特定的音频输出设备,而不是用户在外部进行设置:“控制面板”仅允许选择系统范围内的默认音频输出设备。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM