|
YAACC - UPNP Client and Server
|
Volume and mute of the devices that speak the protocol, through their own interface. More...

Classes | |
| interface | ClientSource |
| Where the clients of the devices come from; the monitor in the app. More... | |
| interface | StateSource |
| The last known state of a device, without any network access. More... | |
Public Member Functions | |
| YxcVolumeAccess (ClientSource clients, StateSource states, BooleanSupplier onMainThread, Executor writer) | |
| boolean | handles (String udn) |
| int | readPercent (String udn) |
| Boolean | readMute (String udn) |
| void | setPercent (String udn, int percent) |
| Sets the volume from a percentage; returns at once, the latest value of a device is the one that is sent. | |
| void | setMute (String udn, boolean muted) |
| Sets the mute state; returns at once. | |
Static Public Member Functions | |
| static synchronized YxcVolumeAccess | getShared () |
| The access of the app, on the shared monitor. | |
Volume and mute of the devices that speak the protocol, through their own interface.
The generic UPnP volume control of such a device does not change the volume while the device is in a group (measured by the owner), the device's own setVolume does, and it changes only that device. The row's slider is a percentage: it maps onto the device's own scale from 0 to its max_volume.
Reads block (they run on the reader threads of the rows). Writes return at once: the last value of a device wins while an earlier one is still on its way, so a drag on the slider does not queue up requests.
| de.yaacc.yxc.YxcVolumeAccess.YxcVolumeAccess | ( | ClientSource | clients, |
| StateSource | states, | ||
| BooleanSupplier | onMainThread, | ||
| Executor | writer ) |
| states | where the last known state comes from, used instead of a read on the main thread |
| onMainThread | whether the calling thread is the main thread, where no network access is allowed (the media session asks the player for its volume there) |
Referenced by de.yaacc.yxc.YxcVolumeAccess.getShared().

| boolean de.yaacc.yxc.YxcVolumeAccess.handles | ( | String | udn | ) |
| Boolean de.yaacc.yxc.YxcVolumeAccess.readMute | ( | String | udn | ) |
null if it can not be read; on the main thread the last known state answers 
| int de.yaacc.yxc.YxcVolumeAccess.readPercent | ( | String | udn | ) |
