Share via


LegacyGipGameControllerProvider.ExecuteCommand(DeviceCommand) Method

Definition

Executes a command on a legacy GIP (Gaming Input Protocol) headset.

public:
 virtual void ExecuteCommand(DeviceCommand command) = ExecuteCommand;
void ExecuteCommand(DeviceCommand const& command);
public void ExecuteCommand(DeviceCommand command);
function executeCommand(command)
Public Sub ExecuteCommand (command As DeviceCommand)

Parameters

command
DeviceCommand

The command to execute.

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

See also