isStarted.lua 567 B

12345678910111213141516171819202122232425262728
  1. return {
  2. tag = 'devices',
  3. summary = 'Check if an audio device is started.',
  4. description = 'Returns whether an audio device is started.',
  5. arguments = {
  6. type = {
  7. type = 'AudioType',
  8. default = [['playback']],
  9. description = 'The type of device to check.'
  10. }
  11. },
  12. returns = {
  13. started = {
  14. type = 'boolean',
  15. description = 'Whether the device is active.'
  16. }
  17. },
  18. variants = {
  19. {
  20. arguments = { 'type' },
  21. returns = { 'started' }
  22. }
  23. },
  24. related = {
  25. 'lovr.audio.start',
  26. 'lovr.audio.stop'
  27. }
  28. }