SoundManager.js 898 B

123456789101112131415161718192021222324252627282930313233
  1. function SoundManager() {
  2. if(arguments[0] != "__skip_ptr__") {
  3. this.__ptr = Polycode.SoundManager()
  4. }
  5. }
  6. Duktape.fin(SoundManager.prototype, function (x) {
  7. if (x === SoundManager.prototype) {
  8. return;
  9. }
  10. Polycode.SoundManager__delete(x.__ptr)
  11. })
  12. SoundManager.prototype.setListenerPosition = function(position) {
  13. Polycode.SoundManager_setListenerPosition(this.__ptr, position)
  14. }
  15. SoundManager.prototype.setListenerOrientation = function(orientation) {
  16. Polycode.SoundManager_setListenerOrientation(this.__ptr, orientation)
  17. }
  18. SoundManager.prototype.recordSound = function(rate,sampleSize) {
  19. return Polycode.SoundManager_recordSound(this.__ptr, rate, sampleSize)
  20. }
  21. SoundManager.prototype.Update = function() {
  22. Polycode.SoundManager_Update(this.__ptr)
  23. }
  24. SoundManager.prototype.setGlobalVolume = function(globalVolume) {
  25. Polycode.SoundManager_setGlobalVolume(this.__ptr, globalVolume)
  26. }