Compartir a través de


LegacyGipGameControllerProvider.GetHeadsetOperation(HeadsetOperation) Método

Definición

Recupera una configuración de auriculares basada en 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()

Parámetros

operation
HeadsetOperation

Configuración que se va a leer.

Devoluciones

Byte[]

byte[]

Un búfer con el formato adecuado para operation.

Ejemplos

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

Comentarios

Precaución

Para evitar daños en los dispositivos, las API de control de auriculares solo deben usarse con hardware que haya desarrollado.

Se aplica a

Consulte también