Problem
Conformance compares audio by hashing samples in a canonical float32 representation. Every adapter reimplements the same conversion:
- Python:
src/conformance/pcm.py FloatPcmHasher
- Rust:
adapters/sendspin-rs/client/src/main.rs:85-133 FloatPcmHasher
- Swift:
adapters/SendspinKit/client/Sources/ConformanceSendspinKitClient/main.swift:~152-231
- C++:
adapters/sendspin-cpp/client/main.cpp (openssl SHA-256 + manual normalization)
- Go: server-side hashing lives in
adapters/sendspin-go/internal/conformance/common.go
Each reimplementation is a place for subtle divergence (bit-depth normalization, 24-bit packed sample handling, endianness, sample ordering). It's also a symptom: SDKs expose raw bytes and leave "make these comparable across languages" to the harness authors.
Why this matters
- When a client fails PCM comparison, bisecting "is this a real playback bug or a hasher bug?" is hard when every language ships its own hasher.
- If the SDK shipped a canonical-samples iterator (or even a hash helper), adapters would stop needing this file.
Proposed SDK additions
Either:
- A per-SDK
canonical_samples(iter_of_bytes, bit_depth) -> iter_of_f32 helper (language-idiomatic) that matches the harness's Python reference byte-for-byte.
- Or a shared protocol-side helper module (the time-filter repo precedent is cited in the spec itself) that every SDK can pull in.
Update all language adapters to use the helper instead of their hand-rolled hasher.
Problem
Conformance compares audio by hashing samples in a canonical float32 representation. Every adapter reimplements the same conversion:
src/conformance/pcm.py FloatPcmHasheradapters/sendspin-rs/client/src/main.rs:85-133FloatPcmHasheradapters/SendspinKit/client/Sources/ConformanceSendspinKitClient/main.swift:~152-231adapters/sendspin-cpp/client/main.cpp(openssl SHA-256 + manual normalization)adapters/sendspin-go/internal/conformance/common.goEach reimplementation is a place for subtle divergence (bit-depth normalization, 24-bit packed sample handling, endianness, sample ordering). It's also a symptom: SDKs expose raw bytes and leave "make these comparable across languages" to the harness authors.
Why this matters
Proposed SDK additions
Either:
canonical_samples(iter_of_bytes, bit_depth) -> iter_of_f32helper (language-idiomatic) that matches the harness's Python reference byte-for-byte.Update all language adapters to use the helper instead of their hand-rolled hasher.