Spatial Audio
Note: you are currently viewing documentation for a beta or an older version of Varjo
Spatial Audio
Spatial Audio (also called binaural audio or 3D audio), refers to any audio that specifically has been processed in order to give a more spatial and directional impression than traditional stereo sound. This is typically done by convolving a mono sound with a head-related transfer function (HRTF), i.e. filtering and delaying it by small amounts according to its particular direction of incidence, in order to produce a psychoacoustic effect of sense of direction. Also multichannel formats (e.g. 5.1 or 7.1) can be processed in a similar fashion in order to produce this spatial and immersive effect.
Enabling Spatial Audio for Varjo XR-4
Varjo XR-4 uses the Microsoft Spatial Sound framework in order to achieve this, and automatically licenses DTS Headphone:X in order to provide the highest spatial and audio quality. In order to use DTS Headphone:X as spatial audio output, connect the Varjo XR-4 to your PC. Right-click on the loudspeaker icon in the Menu tray, and select DTS Headphone:X as the Spatial sound option.
Note: connecting the XR-4 device will enable the DTS Headphone:X option to appear. If it is not in the output option list, ensure that your headset is connected properly and switched on.
Note: if you do not select DTS Headphone:X but leave the setting to “Off”, sound will still play on the Varjo XR-4, but it will simply be the stereo mix and not a spatial (i.e. binaural) mix.
Spatial Audio development for developers
In order to produce the greatest spatial audio quality for your application, it is highly recommended to make use of the Microsoft Spatial Sound framework. The benefit of this is that your application will remain fully agnostic of the output device, and will therefore be completely compatible with other audio output types, such as 7.1, 5.1, or Dolby Atmos. Using the Microsoft Spatial Sound framework, you do not need special tools to target the Varjo headset specifically.
In order to use the Microsoft Spatial Sound, there are several options, depending on what tools you are using for the sound design within your application. The following are the most common tools:
- For sound and music design using Wwise, see: Spatial Audio using Wwise
- For sound and music design using code, see: Spatial Audio from code
- For sound and music design using Unity, see: Spatial Audio using Unity
- For sound and music design using Unreal Engine, see: Spatial Audio using Unreal Engine
Spatial Audio tips
Microsoft Spatial Sound provides a generalised way to render spatial audio, in an output agnostic way that can serve for both binaural audio (for headphone) as well as channel-based audio or other codecs (like Dolby Atmos and DTS:X). It is therefore not recommended you try to render your own binaural audio using a custom binaural audio plug-in, as this way you lose the flexibility of other audio output routes that aren’t binaural. (Or, alternatively, you have to manage all different audio output types yourself.)
If you do decide to use a custom binaural audio rendering plug-in (e.g. Google Resonance, Oculus Spatializer Plugin, or custom HRTF renderer), it is important that it is rendered using stereo bypass mode. When using the Windows Spatial Audio API, this is done by setting the audio object type to AudioObjectType_None
.
Warning: If you do not pass pre-rendered binaural audio as passthrough, Windows Spatial Audio will attempt to binauralise your already binauralised stream, resulting in double processing and a significant deterioration in sound. If you don’t use bypass mode, the only solution for the user is to set Spatial Audio to “Off” altogether in the Windows Sound settings.