init.lua 669 B

123456789101112131415161718
  1. return {
  2. summary = 'A playable sound object.',
  3. description = [[
  4. A Source is an object representing a single sound. Currently ogg, wav, and mp3 formats are
  5. supported.
  6. When a Source is playing, it will send audio to the speakers. Sources do not play automatically
  7. when they are created. Instead, the `play`, `pause`, and `stop` functions can be used to
  8. control when they should play.
  9. `Source:seek` and `Source:tell` can be used to control the playback position of the Source. A
  10. Source can be set to loop when it reaches the end using `Source:setLooping`.
  11. ]],
  12. constructors = {
  13. 'lovr.audio.newSource',
  14. 'Source:clone'
  15. }
  16. }