AudioStreamingSource.lua 740 B

123456789101112131415161718192021222324252627282930
  1. class "AudioStreamingSource"
  2. function AudioStreamingSource:AudioStreamingSource(...)
  3. local arg = {...}
  4. for k,v in pairs(arg) do
  5. if type(v) == "table" then
  6. if v.__ptr ~= nil then
  7. arg[k] = v.__ptr
  8. end
  9. end
  10. end
  11. if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
  12. self.__ptr = Polycode.AudioStreamingSource(unpack(arg))
  13. end
  14. end
  15. function AudioStreamingSource:getNumChannels()
  16. local retVal = Polycode.AudioStreamingSource_getNumChannels(self.__ptr)
  17. return retVal
  18. end
  19. function AudioStreamingSource:getFrequency()
  20. local retVal = Polycode.AudioStreamingSource_getFrequency(self.__ptr)
  21. return retVal
  22. end
  23. function AudioStreamingSource:__delete()
  24. if self then Polycode.delete_AudioStreamingSource(self.__ptr) end
  25. end