Skip to content

feat(sendspin-rs): add a server adapter for the PCM player scenarios - #98

Draft
davidgraeff wants to merge 1 commit into
Sendspin:mainfrom
davidgraeff:feat/sendspin-rs-server-adapter
Draft

feat(sendspin-rs): add a server adapter for the PCM player scenarios#98
davidgraeff wants to merge 1 commit into
Sendspin:mainfrom
davidgraeff:feat/sendspin-rs-server-adapter

Conversation

@davidgraeff

@davidgraeff davidgraeff commented Jul 19, 2026

Copy link
Copy Markdown

What

Adds a real Rust server adapter for sendspin-rs, which previously had
only a client adapter (its server role was a placeholder). This lets the
matrix exercise sendspin-rs as a server against real clients.

  • adapters/sendspin-rs/server/ drives the crate's server API
    (ServerListener / dial_client + Group): decodes the FLAC fixture with
    claxon, negotiates the PCM bit depth from the client's client/hello, and
    streams via the real Group push path. It paces pushes so the connection's
    audio backlog stays shallow, and reports the canonical source PCM hash.
  • build.py: builds the sendspin-rs-server cargo target.
  • implementations.py: flips the sendspin-rs server role to supported,
    scoped to the player/PCM scenarios (the crate's server is player-role,
    PCM v1 — no FLAC/OPUS/metadata/controller/artwork/request-format, so those
    rows stay filtered).

Covered scenarios: client-initiated-pcm (bind + accept),
server-initiated-pcm (dial in), server-initiated-pcm-24bit (24-bit
negotiation).

Validation

Run locally against the sendspin-rs client adapter:

passed: client-initiated-pcm       :: sendspin-rs -> sendspin-rs
passed: server-initiated-pcm       :: sendspin-rs -> sendspin-rs
passed: server-initiated-pcm-24bit :: sendspin-rs -> sendspin-rs

Draft — why

Marked draft until the upstream server role lands and the cross-implementation
runs are confirmed on a host that prebuilds all adapters.

sendspin-rs previously had only a client adapter; its server role was a
placeholder. Add a real Rust server adapter that drives the crate's server
API (ServerListener / dial_client + Group) so sendspin-rs can be exercised as
a server against real clients.

- adapters/sendspin-rs/server/: decodes the FLAC fixture with claxon,
  negotiates the PCM bit depth from the client's hello, and streams via Group.
  Covers client-initiated PCM (bind + accept), server-initiated PCM (dial in),
  and server-initiated 24-bit PCM. Paces pushes so the connection's audio
  backlog stays shallow; reports the canonical source PCM hash.
- build.py: build the `sendspin-rs-server` cargo target.
- implementations.py: flip the sendspin-rs server role to supported
  (player/PCM only — the crate's server is player-role, PCM v1).

Validated locally against the sendspin-rs client adapter: client-initiated-pcm,
server-initiated-pcm, and server-initiated-pcm-24bit all pass (canonical PCM
hashes match).
[dependencies]
clap = { version = "4.5", features = ["derive"] }
claxon = "0.4"
sendspin = { path = "../../../repos/sendspin-rs" }

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: How should I reference the sendspin-rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants