setVolume.lua 545 B

123456789101112131415161718192021222324
  1. return {
  2. tag = 'sourcePlayback',
  3. summary = 'Set the volume of the Source.',
  4. description = 'Sets the current volume factor for the Source.',
  5. arguments = {
  6. volume = {
  7. type = 'number',
  8. description = 'The new volume.'
  9. },
  10. units = {
  11. type = 'VolumeUnit',
  12. default = [['linear']],
  13. description = 'The units of the value.'
  14. }
  15. },
  16. returns = {},
  17. variants = {
  18. {
  19. arguments = { 'volume', 'units' },
  20. returns = {}
  21. }
  22. },
  23. notes = 'The volume will be clamped to a 0-1 range (0 dB).'
  24. }