The control capabilities of a device.
Use this to specify what control operations a device supports.
The system uses this information to enable or disable device-specific controls in the interface.
Returns a capability that lets the device be set to a specific volume level.
Use this when the device supports setting an absolute volume level
in the range `0.0` to `1.0`, where `0` represents silence and `1.0` represents
the maximum volume level.
- Parameters:
- currentLevel: The current volume level of the device, in the range `0.0` to `1.0`.
The system uses this to display the device's current volume in the interface.
- onChange: An async closure the system calls when the user requests a new volume level.
The closure receives the requested new level in the range `0.0` to `1.0`.
Returns a capability that lets the device increase or decrease its volume incrementally.
Use this when the device supports stepwise volume changes but doesn't expose an
absolute level.
- Parameters:
- onIncrement: An async closure the system calls to step the volume up by one increment.
- onDecrement: An async closure the system calls to step the volume down by one increment.