Skip to main content

Module scene_audio_graph

Module scene_audio_graph 

Source
Expand description

Epic 8: Scene-synchronized 3D Holosonic Wavefield & Multi-Bus HRTF Audio Graph with SDF + BVH occlusion. Scene-Synchronized 3D Holosonic Wavefield & HRTF Audio Graph with Shared SDF + BVH Acoustic Occlusion.

Implements Epic 8 of the QualiaDB Superior Game Engine architecture:

  • Synchronizes observer AudioListenerPose directly from camera PGA [Motor] (r, d).
  • Manages up to MAX_SCENE_AUDIO_EMITTERS = 64 active scene emitters (HolosonicNodes + point/ambient emitters) sharing analytical SDF geometry ([HolographicNodeGpu] / PROC1) and epistemic certainty $q$.
  • Evaluates zero-heap acoustic occlusion (evaluate_acoustic_occlusion_zero_heap) against analytical SDF primitives (sphere, capsule, rounded box) and BVH AABB/triangle obstacles with material-specific absorption coefficients (rock/lithology, timber/trunk, foliage canopy, water surface).
  • Computes frequency-dependent RBJ low-pass biquad coefficients, direct-path transmission loss, Fresnel/grazing phase diffraction delay $\Delta\phi$, and 6-tap early reflection geometry delays.
  • Executes a zero-heap 4-bus effect graph (SceneAudioBusGraph):
    1. DirectBinauralBus: Continuous Holosonic wave superposition, per-emitter DF2T biquad occlusion low-pass filtering, and zero-heap HRIR FIR binaural convolution (ITD + ILD + head-shadow).
    2. EarlyReflectionsBus: 6-tap stereo early reflection delay line driven by obstacle geometry.
    3. LateReverbFreeverbBus: Zero-heap stereo Schroeder/Freeverb 4-comb + 2-allpass reverb network modulated by canyon/canopy enclosure density and manifold weight $w$.
    4. HolosonicTelemetryBus: Fixed ring buffer of 48-byte HolosonicSonicToken48 records + SPSC publication into the Q42 U3 SonicTokenRing.

Modules§

pcm
Caller-buffered PCM rendering through the existing scene acoustic buses. Scheduling, decoding, resampling, authorization and device output belong to the host. The active graph capacity is not a limit on authored source count.
pcm_schedule
Transactional event-span PCM scheduling over existing scene acoustic buses. Host owners supply a complete immutable authorized clip view and exact 48 kHz frame clock. This is render state, not a persisted timeline.
source_coupling
Source/pose leases over the existing PCM scheduler. No clock, player, codec, device queue or new DSP is owned here. Host admission remains authoritative.

Structs§

AcousticObstacle
An acoustic obstacle in the shared SDF + BVH scene.
AcousticOcclusionResult
Result of zero-heap acoustic occlusion evaluation between an emitter and the listener.
AudioListenerPose
Observer audio listener pose synchronized from the camera’s 3D PGA Motor.
DirectBinauralBus
Bus 1: Direct Binaural Bus — per-emitter DF2T occlusion low-pass filter + zero-heap HRIR FIR convolution (ITD fractional delay + ILD + contralateral head-shadow).
EarlyReflectionsBus
Bus 2: 6-Tap Early Reflections Bus — stereo multi-tap delay line driven by scene geometry.
HolosonicNode
Scene-synchronized Holosonic / point / ambient audio emitter node.
HolosonicTelemetryBus
Bus 4: Fixed-capacity ring buffer of 48-byte HolosonicSonicToken48 telemetry tokens.
LateReverbFreeverbBus
Bus 3: Zero-Heap Stereo Freeverb Bus (4 parallel comb filters + 2 series all-pass filters per ear) driven by local canyon/canopy enclosure metrics.
SceneAudioBusGraph
Complete Scene-Synchronized 3D Holosonic Wavefield & Multi-Bus HRTF Audio Graph.
ZeroHeapAllpassFilter
Zero-heap Schroeder all-pass diffuser stage for Freeverb.
ZeroHeapCombFilter
Zero-heap Schroeder/Moorer low-pass feedback comb filter for Freeverb.

Enums§

AcousticMaterial
Physical surface & volumetric material class governing acoustic absorption, transmission loss, and early reflection scattering.
AcousticObstacleShape
Shared analytical SDF and BVH B-Rep obstacle shapes for zero-heap acoustic ray/cone queries.

Constants§

EARLY_REFLECTION_TAPS
Number of early reflection geometry delay taps per acoustic occlusion evaluation.
HOLOSONIC_TELEMETRY_RING_CAP
Fixed capacity of the 48-byte HolosonicSonicToken48 telemetry ring buffer.
MAX_SCENE_AUDIO_EMITTERS
Maximum active scene audio emitters processed in the zero-heap audio graph.
ZERO_HEAP_HRIR_TAPS
Zero-heap per-emitter short HRIR FIR tap count for real-time binaural convolution.

Functions§

calc_rbj_lowpass_coeffs
Computes normalized RBJ cookbook 2nd-order low-pass BiquadCoeffs in zero heap.
evaluate_acoustic_occlusion_zero_heap
Evaluates zero-heap acoustic occlusion, Fresnel SDF grazing diffraction, low-pass biquad cutoff, and 6-tap early reflection geometry delays between listener_pos and emitter_pos.