gen

command
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 6 Imported by: 0

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>

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL