Commit a72ccb4
Tell the server the volume we are actually applying
Reading Sendspin/spec settled the question I had parked for item 13, and not in
the direction I expected: this was never a behaviour change to weigh up, it was a
spec violation with a visible symptom we had already been staring at.
- client/state's player `volume` MUST be included when a player advertises the
`volume` command, which this one does.
- "Group volume is the average of the volumes of players in the group that
support the `volume` command." Group volume is *derived from us*. So the
`group volume: 0` that confused this entire field test was our own misreport
averaged straight back to us -- not a server oddity, ours.
- Setting group volume works off "delta = requested_volume -
current_group_volume", so a wrong figure mis-applies every later group volume
change by exactly the error. A player claiming 0 while playing at full hears
a request for 30 as a cut from full rather than a rise from silence, which is
the symptom I had predicted without knowing the mechanism.
- "A server MUST NOT assume these values are unchanged after a reconnect" --
the player is the authority and the server depends on being told.
So main.cpp reports the sink's real gain before anything can connect.
update_volume() rather than reaching for the sink, because it does not invoke
on_volume_changed() -- that fires only for server-initiated changes -- so status
still tells a default apart from a volume a server chose.
Confirmed against the live server: group volume now reads 100 for a single player
at 100 where it read 0 before, and a following `vol 30` lands at a real 30 with
the default qualifier correctly gone.
Two deviations found in the same reading are left for item 13, now known to be
deviations rather than open questions: persisting volume and muted across
restarts is the spec's RECOMMENDED and needs item 8's store, and the software
taper is (volume/100)^2 where the spec says (volume/100)^1.5 -- roughly 3 dB
quiet at volume 50, 6 dB at 25, inherited from upstream and shared by both sinks.
The spec also says volume changes SHOULD be ramped, and nothing here ramps.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 094cb44 commit a72ccb4
3 files changed
Lines changed: 59 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
440 | 446 | | |
441 | 447 | | |
442 | 448 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
740 | 740 | | |
741 | 741 | | |
742 | 742 | | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
750 | 772 | | |
751 | 773 | | |
752 | 774 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
641 | 661 | | |
642 | 662 | | |
643 | 663 | | |
| |||
0 commit comments