C Specification

The XrSoundObjectConfigBD structure is defined as:

// Provided by XR_BD_spatial_audio_rendering
typedef struct XrSoundObjectConfigBD {
    XrStructureType                              type;
    const void*                                  next;
    XrBool32                                     enabled;
    XrPosef                                      pose;
    XrSpace                                      baseSpace;
    float                                        mainVolume;
    float                                        reflectionGain;
    XrBool32                                     enableDoppler;
    const XrSoundObjectDistanceAttenuationBD*    directSoundAttenuation;
    const XrSoundObjectDistanceAttenuationBD*    indirectSoundAttenuation;
} XrSoundObjectConfigBD;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to the next structure in a structure chain.

  • enabled is an XrBool32, indicating whether the sound object is enabled.

  • pose is an XrPosef of the sound object.

  • baseSpace is an XrSpace which the pose is defined in.

  • mainVolume is the main volume of the sound object. It acts as a linear gain attenuation of the input signal in the range (0, 1).

  • reflectionGain is the reflection gain of the sound object. It acts as a linear gain attenuation of the input signal in the range (0, 1) on top of the main volume.

  • enableDoppler is an XrBool32, indicating whether the Doppler effect is enabled.

  • directSoundAttenuation is the XrSoundObjectDistanceAttenuationBD of the direct sound of the sound object, propagating along a straight line from the source to the listener.

  • indirectSoundAttenuation is the XrSoundObjectDistanceAttenuationBD of the indirect sound of the sound object, which is any other propagation that is not considered "direct."

Description

Applications may specify the directivity and/or the shape of a sound object:

If the application does not chain XrSoundObjectShapeSphereBD, the sound object is defined as an infinitesimally small point. If the application does not change XrSoundObjectDirectivityCardioidBD, the sound object is defined to be omnidirectional (uniform sound emission intensity over all directions).

The behavior below specifies how the runtime renders audio when tracking quality changes for the baseSpace.

  • While the baseSpace pose is valid, but not tracked (i.e. xrLocateSpace reports its location with XR_SPACE_LOCATION_POSITION_VALID_BIT and XR_SPACE_LOCATION_ORIENTATION_VALID_BIT set, but not XR_SPACE_LOCATION_POSITION_TRACKED_BIT and XR_VIEW_STATE_POSITION_TRACKED_BIT), the runtime must keep rendering the sound object using the most recent valid pose of that space.

  • While the baseSpace pose is neither valid nor tracked (i.e. xrLocateSpace reports its location with XR_SPACE_LOCATION_POSITION_VALID_BIT and XR_SPACE_LOCATION_ORIENTATION_VALID_BIT unset), the runtime should keep rendering the sound object using the most recent valid pose of that space relative to its parent.

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-2026 The Khronos Group Inc.