setVolume.lua 607 B

123456789101112131415161718192021222324252627
  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. volume = {
  10. type = 'number',
  11. description = 'The master volume.'
  12. },
  13. units = {
  14. type = 'VolumeUnit',
  15. default = [['linear']],
  16. description = 'The units of the value.'
  17. }
  18. },
  19. returns = {},
  20. variants = {
  21. {
  22. arguments = { 'volume', 'units' },
  23. returns = {}
  24. }
  25. },
  26. notes = 'The volume will be clamped to a 0-1 range (0 dB).'
  27. }