Documentation
¶
Overview ¶
Command gen writes one SOFA file per supported DataType (FIR, TF, TF-E, SOS) with sofa.Save, filled with known values, plus an expected.json sidecar describing what a reference reader must see. It exists only to drive the interoperability check in scripts/interop_check.py (h5py and netCDF4); it is internal and not a supported tool.
Save deflates the audio data by default; every file is also written uncompressed (sofa.WithDeflate(0)) as <name>-uncompressed.sofa, with the same expectations.
It also re-saves every file in testdata/sofar/ (written by sofar through netCDF-C) into <outdir>/resaved/, and uncompressed into <outdir>/resaved-uncompressed/, so that the check can compare go-sofa's output with the original writer's. Run it from the repository root.
Usage: go run ./internal/interop/gen <outdir>