Keep only the Rosella and .jochrtf binaural paths
The kernel renders two inputs now: the Rosella .personalized_headphone model and an already compiled .jochrtf field. The SOFA reader, its compile cache and the field fit leave the kernel, and the direct SOFA runtime built on them goes with them: the point-source distance reference, the shoebox image-source model, the generated FDN tables and the asset archives are all gone. Fitting a SOFA into a .jochrtf belongs to the offline toolchain. The compiled-field runtime is the one that predates that work: 64-QMF analysis, 77 hybrid bands, per-object path delays and the project room (image sources plus the shared unitary FDN) computed in code. It keeps its behaviour and takes the .jochrtf name throughout: sofa_binaural_renderer.cpp -> jochrtf_renderer.cpp, binaural_runtime.* -> jochrtf_runtime.*, SofaBinauralRuntime -> JochrtfRuntime, ejoc_sofa_binaural_* -> ejoc_jochrtf_*. The room becomes a switch. --jochrtf-room on|off (default on) drives the enable_early_reflections and enable_late_room flags of the existing room configuration; off renders the field's direct binaural sound only. joc_task_config and joc_stream_config drop hrtf_sofa_path, hrtf_cache_dir, hrtf_cache_policy and hrtf_radius_m, and gain jochrtf_room. The CLI no longer accepts --sofa-hrtf, --hrtf-cache-policy, --hrtf-cache-dir or --hrtf-radius-m; without an explicit input the renderer uses HRTF/binaural.personalized_headphone, and a .jochrtf has to be named through --compiled-hrtf-cache. The SOFA-only unit tests go with the reader. Rosella parsing, filterbank, room and timing are untouched. Both .jochrtf modes reproduce the Python reference sample for sample, and ctest passes.
This commit is contained in:
1 parent
29f4f83c29
commit
20f2e77664
46 files changed
+1180
-8377
No files matched your search
+4
-31
@@ -39,7 +39,7 @@
|
||||
#define JOC_ABI_VERSION 5u
|
||||
#define JOC_FRAME_PARAMS_VERSION 1u
|
||||
#define JOC_EMDF_INFO_VERSION 1u
|
||||
#define JOC_TASK_CONFIG_VERSION 5u
|
||||
#define JOC_TASK_CONFIG_VERSION 4u
|
||||
#define JOC_TASK_RESULT_VERSION 2u
|
||||
#define JOC_EVENT_VERSION 1u
|
||||
|
||||
@@ -358,20 +358,6 @@ typedef enum joc_clip_action {
|
||||
JOC_CLIP_ABORT = 3 /* fail the task */
|
||||
} joc_clip_action;
|
||||
|
||||
/* Local interpolation of the full-HRIR SOFA field (config version 3). */
|
||||
typedef enum joc_sofa_interpolation {
|
||||
JOC_SOFA_INTERPOLATION_LOGMAG_PHASE = 0, /* delay-aligned log-magnitude/phase */
|
||||
JOC_SOFA_INTERPOLATION_MCA_ZERO = 1 /* auditory-band magnitude correction */
|
||||
} joc_sofa_interpolation;
|
||||
|
||||
/* Compiled-HRTF cache policy for the legacy SOFA compile step; the .jochrtf
|
||||
* itself stays an explicit input (hrtf_path). */
|
||||
typedef enum joc_hrtf_cache_policy {
|
||||
JOC_HRTF_CACHE_NONE = 0, /* compile and discard */
|
||||
JOC_HRTF_CACHE_MEMORY = 1, /* compile and keep in this process (default) */
|
||||
JOC_HRTF_CACHE_DISK = 2 /* compile, reuse and write <cache_dir>/<name>.jochrtf */
|
||||
} joc_hrtf_cache_policy;
|
||||
|
||||
/* Which 64-QMF / 77-hybrid filterbank the Rosella .personalized_headphone path
|
||||
* renders through. The two banks differ in coefficients, hybrid tap count,
|
||||
* high-band slot delay and total latency, so they are not interchangeable; the
|
||||
@@ -430,24 +416,11 @@ typedef struct joc_task_config {
|
||||
|
||||
joc_cancel_token* cancel; /* optional */
|
||||
|
||||
/* Binaural HRTF input: when hrtf_sofa_path is set the SOFA renders directly
|
||||
* from its full HRIRs through the reference environment (config version 3)
|
||||
* and hrtf_path is unused. hrtf_path stays the advanced override that reads
|
||||
* a .jochrtf directly with the compiled-field renderer. */
|
||||
const char* hrtf_sofa_path; /* SOFA SimpleFreeFieldHRIR input */
|
||||
/* Binaural input (config version 2): a compiled .jochrtf field (hrtf_path)
|
||||
* or a Rosella .personalized_headphone model. */
|
||||
const char* personalized_headphone_path; /* Rosella .personalized_headphone input */
|
||||
const char* hrtf_cache_dir; /* disk policy directory */
|
||||
uint32_t hrtf_cache_policy; /* joc_hrtf_cache_policy */
|
||||
uint32_t rosella_filterbank; /* joc_rosella_filterbank; 0 = PUBLIC */
|
||||
double hrtf_radius_m; /* SOFA shell radius; <= 0 = automatic */
|
||||
/* Direct SOFA rendering (config version 5). */
|
||||
uint32_t sofa_interpolation; /* joc_sofa_interpolation */
|
||||
double source_reference_distance_m; /* > 0 overrides the mode's reference distance */
|
||||
uint32_t sofa_room; /* non-zero enables the project room */
|
||||
const char* sofa_room_preset; /* "compact" or "legacy"; NULL = by mode */
|
||||
/* Nonzero keeps the legacy SOFA compile step (hrtf_cache_policy/hrtf_cache_dir
|
||||
* decide where the .jochrtf lands); zero renders the SOFA directly. */
|
||||
uint32_t hrtf_compile;
|
||||
uint32_t jochrtf_room; /* non-zero enables the project room */
|
||||
} joc_task_config;
|
||||
|
||||
typedef enum joc_task_status {
|
||||
|
||||
Reference in new issue
Block a user