setVolume.lua 543 B

1234567891011121314151617181920212223
  1. return {
  2. tag = 'listener',
  3. summary = 'Set the master volume.',
  4. description = [[
  5. Sets the master volume. All audio sent to the playback device has its volume multiplied by this
  6. factor.
  7. ]],
  8. arguments = {
  9. {
  10. name = 'volume',
  11. type = 'number',
  12. description = 'The master volume.'
  13. },
  14. {
  15. name = 'units',
  16. type = 'VolumeUnit',
  17. default = [['linear']],
  18. description = 'The units of the value.'
  19. }
  20. },
  21. returns = {},
  22. notes = 'The volume will be clamped to a 0-1 range (0 dB).'
  23. }