Skip to content

Add a volume calibration scenario #64

Description

@balloob

This test scenario was identified by a cross-SDK conformance audit comparing every Sendspin client/server implementation. See the audit docs on branch claude/stream-sync-correction-sdks-AWoNC.

What it tests

Server sets volume = 50, client plays a known fixture, the harness
measures the peak amplitude of the recorded output and asserts it
matches the spec's perceptual curve.

  • Conformant: ≈ 0.5^1.5 = 0.354 × original (≈ −9 dB).
  • Non-conformant linear: ≈ 0.5 × original (≈ −6 dB).

Big user-experience impact, easy assertion.

Why we need it

sendspin-go and sendspin-js apply linear vol/100 gain instead
of the spec's implied (vol/100)^1.5 perceptual curve. A multi-room
group containing one go/js player and one rs/SendspinKit/cli player
will have an audible loudness mismatch at any volume below 100.
Without a test, this regresses silently — and the SDKs that delegate
to platform audio (sendspin-cpp, sendspin-jvm) can't verify their
platform is doing the right thing.

See spec issue: volume curve for the proposed normative text.

Implementation sketch

  • Existing audio-hash machinery, comparing peak amplitudes between
    volume = 100 and volume = 50 runs of the same fixture.
  • Conformant range: 0.30–0.40 (allowing for window/edge effects).
  • Failing range (linear): 0.45–0.55.

Source: docs/volume-curve.md §recommendations

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions