Skip to content

Spatial portability

OpenJOC implements its spatial rendering DSP directly rather than delegating object rendering to platform-specific spatial audio engines. Operating-system audio APIs may be used for integration and I/O, but they do not define OpenJOC's spatial rendering result.

One renderer. Same spatial semantics across platforms.

Native 22.2

22.2 is the generic OpenJOC speaker preset for ITU-R BS.2051-3 Sound System H (9+10+3): 24 semantic channels, 22 spatial speakers, and two semantic LFEs. The canonical OpenJOC order is:

FL, FR, FC, LFE1, BL, BR, FLc, FRc, BC, LFE2, SiL, SiR,
TpFL, TpFR, TpFC, TpC, TpBL, TpBR, TpSiL, TpSiR, TpBC,
BtFC, BtFL, BtFR

The public source identifies the Sound System H speakers and their admissible azimuth/elevation ranges in Table 10 of ITU-R BS.2051-3. OpenJOC uses deterministic midpoints of those public ranges for its normalized layout data. Bottom, middle, upper, and top are four layers in the same generic SpatialLayout projector; there is no 22.2-specific renderer.

LFE1 and LFE2 are never spatial projection vertices. The current E-AC-3 input boundary supplies one base LFE plane; for a 22.2 physical output that plane is copied to both explicitly labeled LFE destinations. Objects cannot enter either LFE through point, Region, Extent, Spread, Pair, or ChannelLock projection.

WAV output is 24-channel PCM without a fabricated WAVEFORMATEXTENSIBLE mask, because the standard mask cannot faithfully describe the full 22.2 identity set. The CLI reports this limitation. CAF output carries ordered channel descriptions, using standard CAF labels where available and explicit coordinate descriptions for the remaining 22.2 positions.

Built-in generic binaural

--binaural without --sofa selects the bundled SADIE II D1 KU100 generic resource. It is an offline data resource, not an external renderer. The same OpenJOC SOFA ingestion, spherical interpolation, delay handling, causal FIR convolution, and tail-drain path are used for built-in and user-provided SOFA inputs. --sofa FILE remains an explicit override and malformed user SOFAs still fail closed.

License gate: HRTF_REDISTRIBUTION_VERIFIED.

The bundled representation is the official SADIE II D1 48 kHz, 256-tap HRIR grid converted from HDF5 SOFA to OpenJOC's already-supported NetCDF classic CDF-1 subset. It retains the 8,802 measured directions and adds 15 exact canonical virtual-speaker aliases copied from their nearest measured HRIR; the bundled bank has 8,817 entries and is approximately 17.3 MiB. The maximum alias angular gap is 2.542 degrees and is checked by the offline generator; no runtime nearest-neighbor fallback is used. The offline converter is tools/generate-builtin-hrtf.py; it requires HDF5 Python tooling only when regenerating the checked-in resource. Rendering does not require Python, HDF5, a network connection, or a runtime download.

Reproducibility record for the authorized upstream file used for this bundle:

upstream source: https://sofacoustics.org/data/database/sadie/D1_48K_24bit_256tap_FIR_SOFA.sofa
upstream SHA-256: e6c72a84dd947b5ef75438ab96a9c2a32ed10f033472b9c4c11a49aff00a8a31
generator: tools/generate-builtin-hrtf.py
generated SHA-256: b9bcecd8a07e7eed4474a9b063c47672384339e83605bd245ff0adc098869fab
generated bytes: 18164824

The standard default virtual layout is 7.1.4. The resource is native 48 kHz, so no built-in-only resampler is introduced. HRIR delays are zero in this source; the renderer nevertheless preserves its general delay-aware SOFA contract.

API behavior

Rust callers use BinauralConfig::builtin_generic(...) for the default or BinauralConfig::from_sofa_bytes(...) for an explicit user dataset. Existing BinauralConfig { sofa_bytes: ... } construction remains valid: empty bytes select the built-in resource and non-empty bytes select the user SOFA. C ABI callers pass a null/zero SOFA buffer for the built-in resource and a non-empty buffer for a user SOFA; the ABI struct layout and size-compatibility rules are unchanged.