YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.sendspin.GroupVolume Class Reference

The group volume as the controller role of the Sendspin protocol sets it: every player moves by the same delta, a player that reaches a boundary is clamped and what it could not take is divided among the others, until all of it is applied or all are at a boundary; the results are rounded to integers at the end. More...

Collaboration diagram for de.yaacc.sendspin.GroupVolume:
Collaboration graph

Static Public Member Functions

static int[] targets (int[] current, int requested)
 

Detailed Description

The group volume as the controller role of the Sendspin protocol sets it: every player moves by the same delta, a player that reaches a boundary is clamped and what it could not take is divided among the others, until all of it is applied or all are at a boundary; the results are rounded to integers at the end.

Pure.

Member Function Documentation

◆ targets()

static int[] de.yaacc.sendspin.GroupVolume.targets ( int[] current,
int requested )
static
Parameters
currentthe volumes (0 to 100) of the players that support volume
requestedthe volume asked for the whole group; outside 0 to 100 it is clamped
Returns
the volume to send to each player, in the same order

Referenced by de.yaacc.sendspin.SendspinHub.setGroupVolume().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: