newSource.lua 856 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. return {
  2. tag = 'sources',
  3. summary = 'Create a new Source.',
  4. description = 'Creates a new Source from an ogg, wav, or mp3 file.',
  5. arguments = {
  6. filename = {
  7. type = 'string',
  8. description = 'The filename of the sound to load.'
  9. },
  10. blob = {
  11. type = 'Blob',
  12. description = 'The Blob containing the Source data.'
  13. },
  14. soundData = {
  15. type = 'Sound',
  16. description = 'The Sound containing raw audio samples to play.'
  17. }
  18. },
  19. returns = {
  20. source = {
  21. type = 'Source',
  22. description = 'The new Source.'
  23. }
  24. },
  25. variants = {
  26. {
  27. arguments = { 'filename' },
  28. returns = { 'source' }
  29. },
  30. {
  31. arguments = { 'blob' },
  32. returns = { 'source' }
  33. },
  34. {
  35. arguments = { 'sound' },
  36. returns = { 'source' }
  37. }
  38. },
  39. related = {
  40. 'Source:clone'
  41. }
  42. }