isEffectEnabled.lua 900 B

123456789101112131415161718192021222324252627282930313233
  1. return {
  2. tag = 'sourceEffects',
  3. summary = 'Check if an effect is enabled.',
  4. description = 'Returns whether a given `Effect` is enabled for the Source.',
  5. arguments = {
  6. effect = {
  7. type = 'Effect',
  8. description = 'The effect.'
  9. }
  10. },
  11. returns = {
  12. enabled = {
  13. type = 'boolean',
  14. description = 'Whether the effect is enabled.'
  15. }
  16. },
  17. variants = {
  18. {
  19. arguments = { 'effect' },
  20. returns = { 'enabled' }
  21. }
  22. },
  23. notes = [[
  24. The active spatializer will determine which effects are supported. If an unsupported effect is
  25. enabled on a Source, no error will be reported. Instead, it will be silently ignored. See
  26. `lovr.audio.getSpatializer` for a table showing the effects supported by each spatializer.
  27. Calling this function on a non-spatial Source will always return false.
  28. ]],
  29. related = {
  30. 'Source:isSpatial'
  31. }
  32. }