Expand description
Test helpers shared by every crate: synthetic signals generated by code (never binary fixtures in git), a ready-made context, and comparison metrics.
Structs§
- TempDir
- A temp directory unique to the test, removed on drop.
Statics§
Functions§
- add
- Sum two buffers (shorter one zero-padded).
- args
- Build args for
specfromkey=valuepairs (defaults applied). - chirp
- Linear chirp from f0 to f1.
- clicks
- Click train: single-sample impulses every
periodseconds. - ctx
- A context with no inputs, SimpleIo, and no progress output.
- ctx_
with - A context with a registry attached (for composite ops).
- leak_
registry - Leak a registry for tests that need
'static. - noise
- Deterministic white noise in [-amp, amp].
- read_
wav - rms_db
- RMS of a slice in dBFS.
- rms_
diff - RMS of the difference (over the common length).
- run
- Run a transform spec directly.
- run_ctx
- Run a transform spec and also return the context (to assert on metrics, notes, warnings).
- si_sdr
- Scale-invariant SDR of
estimateagainstreference, in dB. - sine
- stereo
- tone_
level - Magnitude (linear) of frequency
finxusing a Goertzel filter, normalized so a full-scale sine reads 1.0. - write_
wav - Write a float WAV for tests.