Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all Roon zones support absolute volume setting #25

Open
zehnm opened this issue Dec 22, 2023 · 0 comments
Open

Not all Roon zones support absolute volume setting #25

zehnm opened this issue Dec 22, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@zehnm
Copy link
Contributor

zehnm commented Dec 22, 2023

Not all Roon zones support volume setting: check for type: incremental.

https://github.com/RoonLabs/node-roon-api-transport/blob/master/lib.js#L62-L73

 * @property {object}  [volume] - This field is populated for outputs that support volume control.<p style='white-space: pre-wrap;'>
 * Note that volume values, bounds, and step are floating point values, not integers, and that volume ranges can extend below and above zero, sometimes at the same time.
 *
 * Examples:
 *
 * This list of examples is not meant to be exhaustive--it just serves to create a sense of the range of options out there.
 * <pre>
 *     { "type": "db",    "min": -80, "max": 0,   "value": -50.5, "step": 0.5 }
 *     { "type": "db",    "min": -80, "max": 10,  "value": 4,     "step": 1.0 }
 *     { "type": "number" "min": 0,   "max": 100, "value": 80,    "step": 1.0 }
 *     { "type": "number" "min": 1,   "max": 99,  "value": 65,    "step": 1.0 }
 *     { "type": "incremental" }
 * </pre>
 * </pre>
 * @property {('number'|'db'|'incremental'|*)}  [volume.type] - If you receive an unanticipated value for this, treat it like "number".  The "incremental" type represents a volume control that just has "+" and "-" buttons, with no feedback about the current volume value or its range. It might be used in conjunction with an IR blaster, for example. In this case, all of the remaining properties (min,max,step,value,is_muted,limits) will be absent. With an "incremental" control, you should display two buttons, and when issuing change_volume requests, use "relative" mode and only send adjustments of +1/-1.
 * @property {number}  [volume.min] - The minimum value in the volume range
 * @property {number}  [volume.max] - The maximum value in the volume range
 * @property {number}  [volume.value] - The current value of the volume control
 * @property {number}  [volume.step] - The step size for the volume control, in terms of its native units
 * @property {boolean}  [volume.is_muted] - True if the zone is muted, false otherwise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant