|
JPL Spatial
Sound spatialization and propagation library
|
This dependency-free console example uses JPL Spatial's low-level 2D VBAP panner. It places a point source in front of, to the right of, behind, and to the left of a listener and prints the gain sent to each speaker in a quad output layout.
The example deliberately starts with the low-level panner because it is a small, focused integration surface. It does not require an audio device or audio-file dependency: the computed gains are the values a host would apply in its own mixer.
From the JPL Spatial repository root:
The executable location follows the build tree supplied with -B. Run it from an open terminal. For the commands above, a single-config build runs with:
The Visual Studio Release build runs with:
Expected result:
The source directions are already normalized and use JPL Spatial's right-handed, Y-up, -Z-forward coordinate convention.
JPLSPATIAL_SOURCE_DIR is a cache variable, so the example can also be pointed at another checkout: