Headset 类

定义

包含有关连接到游戏板的音频耳机的信息。

public ref class Headset sealed
public ref class Headset sealed : IGameControllerBatteryInfo
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class Headset final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class Headset final : IGameControllerBatteryInfo
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class Headset
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class Headset : IGameControllerBatteryInfo
Public NotInheritable Class Headset
Public NotInheritable Class Headset
Implements IGameControllerBatteryInfo
继承
Object Platform::Object IInspectable Headset
属性
实现

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

注解

无法直接创建头戴显示设备类的实例;相反,头戴显示设备类的实例是通过 Gamepad.Headset 属性或 Gamepad.HeadsetConnected 事件检索的。

版本历史记录

Windows 版本 SDK 版本 已添加值
1703 15063 TryGetBatteryReport

属性

CaptureDeviceId

头戴显示设备的音频捕获设备的 XAudio 终结点 ID。

RenderDeviceId

头戴显示设备的 XAudio enpoint ID。

方法

TryGetBatteryReport()

获取有关头戴显示设备的当前电池状态的信息。

适用于