LegacyGipGameControllerProvider.ExecuteCommand(DeviceCommand) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Exécute une commande sur un casque GIP (Gaming Input Protocol) hérité.
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)
Paramètres
- command
- DeviceCommand
Commande à exécuter.
Exemples
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);
}
Remarques
Attention
Pour éviter d’endommager les appareils, les API de contrôle du casque ne doivent être utilisées qu’avec le matériel que vous avez développé.