Condividi tramite


LegacyGipGameControllerProvider.GetHeadsetOperation(HeadsetOperation) Metodo

Definizione

Recupera un'impostazione visore in base a operation.

public:
 virtual Platform::Array <byte> ^ GetHeadsetOperation(HeadsetOperation operation) = GetHeadsetOperation;
winrt::array_view <byte> GetHeadsetOperation(HeadsetOperation const& operation);
public byte[] GetHeadsetOperation(HeadsetOperation operation);
function getHeadsetOperation(operation)
Public Function GetHeadsetOperation (operation As HeadsetOperation) As Byte()

Parametri

operation
HeadsetOperation

Impostazione da leggere.

Restituisce

Byte[]

byte[]

Buffer con il formato appropriato per operation.

Esempio

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);
}

Commenti

Attenzione

Per evitare danni ai dispositivi, le API del controllo visore devono essere usate solo con hardware sviluppato.

Si applica a

Vedi anche