clone.lua 823 B

123456789101112131415161718192021222324
  1. return {
  2. summary = 'Create an identical copy of the Source.',
  3. description = [[
  4. Creates a copy of the Source, referencing the same `Sound` object and inheriting all of the
  5. settings of this Source. However, it will be created in the stopped state and will be rewound to
  6. the beginning.
  7. ]],
  8. arguments = {},
  9. returns = {
  10. {
  11. name = 'source',
  12. type = 'Source',
  13. description = 'A genetically identical copy of the Source.'
  14. }
  15. },
  16. notes = [[
  17. This is a good way to create multiple Sources that play the same sound, since the audio data
  18. won't be loaded multiple times and can just be reused. You can also create multiple `Source`
  19. objects and pass in the same `Sound` object for each one, which will have the same effect.
  20. ]],
  21. related = {
  22. 'lovr.audio.newSource'
  23. }
  24. }