Share via


HeadsetLevel Enum

Definition

Indicates levels of variable settings like volume for headsets.

public enum class HeadsetLevel
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Gaming.Input.GamingInputPreviewContract, 131072)]
enum class HeadsetLevel
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Gaming.Input.GamingInputPreviewContract), 131072)]
public enum HeadsetLevel
var value = Windows.Gaming.Input.Preview.HeadsetLevel.off
Public Enum HeadsetLevel
Inheritance
HeadsetLevel
Attributes

Windows requirements

Device family
Windows Desktop Extension SDK (introduced in 10.0.23665.0)
API contract
Windows.Gaming.Input.GamingInputPreviewContract (introduced in v2.0)

Fields

Name Value Description
Off 0

The level is off.

Low 1

The level is low.

Medium 2

The level is medium.

High 3

The level is high.

Examples

public void SetupHeadset(IGameControllerProvider headsetProvider)
{
    LegacyGipGameControllerProvider legacyGipGameControllerProvider =
        LegacyGipGameControllerProvider.FromGameControllerProvider(headsetProvider);

    // Reset the device
    legacyGipGameControllerProvider.ExecuteCommand(DeviceCommand.Reset);

    // Check the smart mute level
    byte[] smartMuteBuffer =
        legacyGipGameControllerProvider.GetHeadsetOperation(HeadsetOperation.SmartMute);
    HeadsetLevel smartMuteValue = (HeadsetLevel)smartMuteBuffer[0];

    // Set bass boost to 3db
    byte[] bassBuffer = BitConverter.GetBytes((UInt32)3);
    legacyGipGameControllerProvider.SetHeadsetOperation(HeadsetOperation.BassBoostGain,
        bassBuffer);
}

Remarks

Caution

To avoid damaging devices, the headset control APIs should only be used with hardware you have developed.

Applies to