|
YAACC - UPNP Client and Server
|
The volume and the mute state of the music stream of the device: the one value the app's own volume controls (UpnpClient.setVolume/setMute), the renderer's RenderingControl service (SetVolume, SetMute, GetVolume, GetMute) and the hardware volume keys share.
More...


Public Member Functions | |
| SystemVolume (Context context) | |
| boolean | isMuted () |
| int | getPercent () |
| void | setMuted (boolean mute) |
| void | setPercent (int desired) |
Public Member Functions inherited from de.yaacc.upnp.server.renderingcontrol.RendererVolume | |
| default int | peekPercent () |
As getPercent(), for the check that reports a change to the controllers (the RenderingControl event): it reads and never wakes a connection. | |
| default void | wakeNow () |
| A control point subscribed to the renderer's events: if the volume lives on a server, make sure its connection is up (once, not at every change). | |
| default boolean | peekMuted () |
As isMuted(), without waking anything; see peekPercent(). | |
Static Public Member Functions | |
| static void | addChangeListener (Runnable listener) |
| static void | removeChangeListener (Runnable listener) |
The volume and the mute state of the music stream of the device: the one value the app's own volume controls (UpnpClient.setVolume/setMute), the renderer's RenderingControl service (SetVolume, SetMute, GetVolume, GetMute) and the hardware volume keys share.
The volume is 0 to 100 (percent of the stream's range, rounded to the nearest step the stream has).
A change made through this class is told to the in-process listeners (addChangeListener), so a control point that is subscribed to the renderer hears about a change made in the app without waiting for the system's volume broadcast. Changes made elsewhere (hardware keys, the system's panel) are not seen here; SystemVolumeBroadcastWatcher catches those.
|
static |
| listener | called (on the thread that made the change) after a volume or mute change through setPercent or setMuted of any instance |
| int de.yaacc.upnp.server.renderingcontrol.SystemVolume.getPercent | ( | ) |
Implements de.yaacc.upnp.server.renderingcontrol.RendererVolume.
Referenced by de.yaacc.upnp.UpnpClient.getVolume().

| boolean de.yaacc.upnp.server.renderingcontrol.SystemVolume.isMuted | ( | ) |
Implements de.yaacc.upnp.server.renderingcontrol.RendererVolume.
Referenced by de.yaacc.upnp.UpnpClient.isMute().

| void de.yaacc.upnp.server.renderingcontrol.SystemVolume.setMuted | ( | boolean | mute | ) |
| void de.yaacc.upnp.server.renderingcontrol.SystemVolume.setPercent | ( | int | desired | ) |
| desired | the volume in the range of 0-100, values outside of it are cut to it |
Implements de.yaacc.upnp.server.renderingcontrol.RendererVolume.
Referenced by de.yaacc.upnp.UpnpClient.setVolume().
