有没有办法使用c#获取/设置Windows 10播放设备属性? [英] Is there a way to get/set windows 10 playback device properties using c#?

查看:237
本文介绍了有没有办法使用c#获取/设置Windows 10播放设备属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




有没有办法使用c#获取/设置Windows当前播放设备的格式?

Is there a way to get/set format of the windows current playback device using c#?

选项位于Properties->高级 - >默认格式。

The options are in Properties-> Advanced -> Default format.

推荐答案

Hello  newboy007,

Hello newboy007,

对于C#,有一个UWP API,在
AudioEncodingProperties
,你可以查看它是否有帮助。

For C# there is an UWP API, there are properties like SampleRate etc in AudioEncodingProperties, you can check to see if it helps.

对于C ++,它可以用  PKEY_AudioEngine_DeviceFormat属性来完成; 核心音频属性。您可以通过这种方式搜索
C#中的实现方式。

For C++, it can be done with PKEY_AudioEngine_DeviceFormat property of Core Audio Properties. You can search for how to implement in C# about this way.

更多参考:" 如何协商Windows Audio Session API的音频格式(WASAPI)客户"

More reference: "How to negotiate an audio format for a Windows Audio Session API (WASAPI) client"

如果有帮助请告诉我。

祝你好运,

Rita


这篇关于有没有办法使用c#获取/设置Windows 10播放设备属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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