C Specification

An application can trigger an amplitude envelope haptic effect by creating a XrHapticAmplitudeEnvelopeVibrationFB structure and calling xrApplyHapticFeedback.

The XrHapticAmplitudeEnvelopeVibrationFB structure is defined as:

// Provided by XR_FB_haptic_amplitude_envelope
typedef struct XrHapticAmplitudeEnvelopeVibrationFB {
    XrStructureType    type;
    const void*        next;
    XrDuration         duration;
    uint32_t           amplitudeCount;
    const float*       amplitudes;
} XrHapticAmplitudeEnvelopeVibrationFB;

Members

This structure describes an amplitude envelope haptic effect.

Description

Member Descriptions

The runtime should resample the provided samples in the amplitudes, and maintain an internal buffer which should be of XR_MAX_HAPTIC_AMPLITUDE_ENVELOPE_SAMPLES_FB length. The resampling should happen based on the duration, amplitudeCount, and the device’s sample rate.

Valid Usage (Implicit)

See Also

Document Notes

For more information, see the OpenXR Specification

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright 2014-2024, The Khronos Group Inc.