<img src="https://certify.alexametrics.com/atrk.gif?account=bIEZv1FYxz20cv" style="display:none" height="1" width="1" alt="">
Skip to content

Spatial Audio Licensing

Codebase Documentation

Source code includes:

The C++ source code for the reference implementation of High Fidelity's client-side audio spatializer for iOS and Android applications.

  • No external dependencies, other than the Agora Native SDK. The version used (Agora Native SDK v3.3.2) is included.
  • Supports an unlimited number of audio source streams (limited only by CPU consumption).
  • Includes platform-specific optimizations for recent Intel x86 and ARM CPUs.
  • Includes basic integration with the Agora Native SDK.
  • Spatializes the incoming Agora audio streams, based on the relationship of each source to the listener:
    • Implements a far-field HRTF based on source azimuth and distance. Includes 25 choices of HRTF model.
    • Implements a near-field HRTF when sources are closer than 1m to the listener.
    • Implements a default distance attenuation curve.
    • Implements a progressive lowpass filter for distance/occlusion effect.
    • Implements a high-dynamic-range audio mixer that handles very loud mixes without distortion.
    • Implements high-quality resampling to and from the Agora native sample rate (48khz)


The Swift/Objective-C source code to an example iOS app, derived from the reference code above.

  • This is an unsupported demo, and is not considered the reference implementation.
  • It demonstrates a user interface, graphics, and movement of the sources and listener.
  • An example 2D background is included, where the walls affect the audio occlusion of the sources.
  • The position of each source is inserted into, and extracted from, the Agora packets as metadata.
  • A separate "bot" app simulates additional sources, using prerecorded audio instead of a mic.

Please note that due to variations in devices or platforms, or otherwise, the software may not always perform as outlined in this documentation.