getVolume.lua 608 B

12345678910111213141516171819202122232425262728
  1. return {
  2. tag = 'listener',
  3. summary = 'Get the master volume.',
  4. description = [[
  5. Returns the master volume. All audio sent to the playback device has its volume multiplied by
  6. this factor.
  7. ]],
  8. arguments = {
  9. units = {
  10. type = 'VolumeUnit',
  11. default = [['linear']],
  12. description = 'The units to return (linear or db).'
  13. }
  14. },
  15. returns = {
  16. volume = {
  17. type = 'number',
  18. description = 'The master volume.'
  19. }
  20. },
  21. variants = {
  22. {
  23. arguments = { 'units' },
  24. returns = { 'volume' }
  25. }
  26. },
  27. notes = 'The default volume is 1.0 (0 dB).'
  28. }