# step: loudness · wai-rs and loudness_verify.py # order: 556 # features: loudness # paths: wai/extensions/packaging.md # independent: loudness media python3 -I pack-conformance/loudness_verify.py pack-conformance/loudness # # Loudness (extensions/packaging.md §12): the reference module's unit tests (the integer # logarithm exact at powers of two, BS.1770's calibration tone at -3.01 LKFS, silence and short # programmes with no loudness, unsupported rates and layouts refused, a statement read back and # its gain and receipt held) and the corpus's (it reaches every stated outcome, and a changed # figure fails), and tests/loudness.rs (vectors.json regenerates byte for byte, wai-rs gives # every case its stated outcome, and §12.7 lists exactly the reference's codes); and, in the # step of every independent verifier above, the corpus's second implementation, # loudness_verify.py, written from the extension's text and sharing no code with wai-rs, which # writes each programme's samples from its formula, filters, gates and takes the integer # logarithm itself, checks signatures with the shared _ed25519.py, reads §12.7, requires every # mutated copy of the corpus to fail and drops each of its own checks in turn; standard library # only, run isolated (-I). wai-pack's own tests (wai-pack.yml) run `wai-pack loudness`. # # The paths this step brings to the workflow's trigger, and why: # wai/extensions/packaging.md: tests/loudness.rs requires §12.7 to list the reference's codes, # and loudness_verify.py reads it. set -euo pipefail (cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib -- loudness::) (cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test loudness)