getDuration.lua 543 B

123456789101112131415161718192021222324
  1. return {
  2. summary = 'Get the duration of the Sound.',
  3. description = 'Returns the duration of the Sound, in seconds.',
  4. arguments = {},
  5. returns = {
  6. duration = {
  7. type = 'number',
  8. description = 'The duration of the Sound, in seconds.'
  9. }
  10. },
  11. variants = {
  12. {
  13. arguments = {},
  14. returns = { 'duration' }
  15. }
  16. },
  17. notes = 'This can be computed as `(frameCount / sampleRate)`.',
  18. related = {
  19. 'Sound:getFrameCount',
  20. 'Sound:getSampleCount',
  21. 'Sound:getSampleRate',
  22. 'Source:getDuration'
  23. }
  24. }