Add server-initiated-pcm-24bit scenario (#60)#68
Closed
balloob wants to merge 3 commits into
Closed
Conversation
Adds the 24-bit PCM scenario from #60. The server re-packs the fixture as 24-bit (3-byte packed, little-endian, two's complement) and the matrix compares canonical hashes after the client unpacks. Per the audit, sendspin-go has no 24-bit code path and Web Audio in sendspin-js is float32-only — the conformance signal is expected to be different per-SDK once `pcm-24bit-decode` is wired up in each adapter. `pcm-24bit-decode` is declared on the aiosendspin server only; every client case fails fast until the adapter declares the capability.
This was referenced May 27, 2026
The server adapter feeds 32-bit source PCM into the SDK with AudioFormat(bit_depth=32). The aiosendspin PCM pipeline negotiates the 24-bit packed wire format from the client, resamples s32→s32 through PyAV, and then converts the output to s24 on the wire. The SDK's source-format path expects PyAV-compatible bytes (which means s32, since PyAV does not have a packed-s24 sample format) — feeding s24 directly would fail with \"got N bytes; need 4N/3 bytes\" inside PyAV. The 16→32-bit shift preserves the float-domain hash, so the existing audio-pcm verification continues to work end-to-end. The client adapter advertises bit_depth=24 at the fixture's native sample_rate/channels (8000 Hz mono) so the SDK does not resample during the round trip; only the bit depth changes. aiosendspin's client RoleSpec declares the new pcm-24bit-decode capability, and the scenario flips its verification_mode to audio-pcm so the float hashes are actually compared.
This was referenced May 27, 2026
Collaborator
Author
|
Closing in favor of #NEW — that PR is rebased onto main without the capability mechanism (which only existed to drive the now-closed scaffolding PRs). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
server-initiated-pcm-24bitscenario from Sendspin/conformance#60 to the matrixpcm-24bit-decodeon the aiosendspin server onlyNotes
binary.LittleEndianfor 16/32 only) and Web Audio in sendspin-js is float32-only. Other SDKs (cpp, rs, SendspinKit) handle 24-bit correctly but no conformance scenario exercises it today.Test plan
python -m compileall src scriptspython -m conformance.cli run --results-dir results --from aiosendspin --to aiosendspin --timeout-seconds 25shows the new scenario row with the expected fail-fast reason