|
YAACC - UPNP Client and Server
|
The hardware volume keys on the focused Snapcast group (11.4). More...

Classes | |
| class | Decision |
| What one key press does to a group. | |
| enum | Direction |
| The two keys. More... | |
| interface | Model |
| What the row of a group shows now (volume, mute, controllable); null when the group is not known. More... | |
| class | Result |
| What the Android code shows after a press. | |
| interface | Sink |
| Where the changes go. More... | |
Public Member Functions | |
| SnapcastVolumeKeys (Model model, Sink sink, MonotonicClock clock) | |
| void | volumeChanged (String receiverId, int percent) |
| The user set the group volume with the slider (card or sheet): the next key starts from that value, not from the value of an earlier key press or from a model that has not caught up. | |
| void | muteChanged (String receiverId, boolean muted) |
| The user muted or unmuted the group with the symbol: the next key starts from that state; the volume is the one a key press asked for a moment ago, else the model's. | |
| Result | press (String receiverId, Direction direction) |
A key press on the group of receiverId (the id of its receiver row). | |
Static Public Member Functions | |
| static Decision | decide (Direction direction, int percent, boolean muted, boolean controllable) |
| The decision for one press. | |
The hardware volume keys on the focused Snapcast group (11.4).
Pure Java: which group is the target is decided by SnapcastKeyFocus, the Android code only passes the key and shows the answer.
SnapcastControls#setGroupVolume: every member moves by the same number of points), clamped to 0..100. Every change goes through the one Sink (the app's SnapcastControls): off the main thread, coalesced, failures as a toast.
|
static |
The decision for one press.
| percent | the group volume now, -1 when there is none |
| controllable | whether a change makes sense (the server answers and a member is connected) |
Referenced by de.yaacc.snapcast.ui.SnapcastVolumeKeys.press().

| Result de.yaacc.snapcast.ui.SnapcastVolumeKeys.press | ( | String | receiverId, |
| Direction | direction ) |
A key press on the group of receiverId (the id of its receiver row).

| void de.yaacc.snapcast.ui.SnapcastVolumeKeys.volumeChanged | ( | String | receiverId, |
| int | percent ) |
The user set the group volume with the slider (card or sheet): the next key starts from that value, not from the value of an earlier key press or from a model that has not caught up.
The mute state is the group's as the model shows it.