LegacyGipGameControllerProvider.ExecuteCommand(DeviceCommand) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.