Add server-initiated-pcm-24bit scenario with end-to-end test (#60)#73
Open
balloob wants to merge 1 commit into
Open
Add server-initiated-pcm-24bit scenario with end-to-end test (#60)#73balloob wants to merge 1 commit into
balloob wants to merge 1 commit into
Conversation
Closes #60. Adds a `server-initiated-pcm-24bit` scenario that emits the 24-bit packed wire format (3-byte packed, little-endian, two's complement) and reuses the existing `audio-pcm` verification mode. The aiosendspin server feeds 32-bit source PCM into the SDK with AudioFormat(bit_depth=32) because the SDK ingests PyAV-compatible samples; the negotiated wire format from the client (24-bit) drives the output conversion to s24 via the SDK's existing s32→s24 path. Feeding raw 3-byte/sample input to prepare_audio would fail inside PyAV with "got N bytes; need 4N/3 bytes" because there is no packed-s24 sample format in PyAV. The 16→32-bit shift used here preserves the float-domain hash, so the existing audio-pcm verification matches end-to-end. The client adapter advertises bit_depth=24 at the fixture's native rate/channels so the SDK does not resample during the round trip — only the bit depth changes. Other client adapters that do not yet hardcode the new scenario_id will fail their cases until they grow the matching SupportedAudioFormat advertisement, surfacing per-SDK 24-bit decode gaps (notably sendspin-go has no 24-bit code path and sendspin-js should filter 24-bit out of its negotiation since Web Audio is float32-only).
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 with a real end-to-end test through the aiosendspin server and client adaptersaudio-pcmverification mode — no new capability machineryWhy this shape
The aiosendspin SDK ingests PyAV-compatible samples, and PyAV does not have a packed-s24 sample format. Feeding raw 3-byte/sample input to
prepare_audiowould fail inside PyAV with "got N bytes; need 4N/3 bytes". So the server adapter feeds 32-bit source PCM withAudioFormat(bit_depth=32)and lets the SDK's existing s32→s24 path produce the 24-bit packed wire format the client negotiates.Per-SDK impact
aiosendspin↔aiosendspin: passesscenario_idand matchingSupportedAudioFormat(bit_depth=24)will fail their cases, surfacing the per-SDK 24-bit decode gap the audit identified (notablysendspin-gohas no 24-bit code path;sendspin-jsshould filter 24-bit out of its negotiation since Web Audio is float32-only)Context
Other audit-identified scenarios (drift injection, burst cadence, request-format renegotiation, external-source, multi-server arbitration, static-delay, volume curve) need adapter-side surface (a real playback pipeline or SDK hooks aiosendspin's reference adapter doesn't expose) before they can produce real signal. Those PRs were closed; they will be revisited as SDK surface lands.
Test plan
python -m compileall src scriptspython -m conformance.cli run --results-dir results --from aiosendspin --to aiosendspin --timeout-seconds 25— the newserver-initiated-pcm-24bitrow passes; pre-existing scenarios still pass