SoundManager.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. function SoundManager() {
  2. }
  3. SoundManager.prototype.setListenerPosition = function(position) {
  4. Polycode.SoundManager_setListenerPosition(this.__ptr, position)
  5. }
  6. SoundManager.prototype.setListenerOrientation = function(orientation,upVector) {
  7. Polycode.SoundManager_setListenerOrientation(this.__ptr, orientation,upVector)
  8. }
  9. SoundManager.prototype.recordSound = function(rate,sampleSize) {
  10. return Polycode.SoundManager_recordSound(this.__ptr, rate,sampleSize)
  11. }
  12. SoundManager.prototype.stopRecording = function(generateFloatBuffer) {
  13. var retVal = new Sound()
  14. retVal.__ptr = Polycode.SoundManager_stopRecording(this.__ptr, generateFloatBuffer)
  15. return retVal
  16. }
  17. SoundManager.prototype.setAudioInterface = function(audioInterface) {
  18. Polycode.SoundManager_setAudioInterface(this.__ptr, audioInterface)
  19. }
  20. SoundManager.prototype.Update = function() {
  21. Polycode.SoundManager_Update(this.__ptr)
  22. }
  23. SoundManager.prototype.setGlobalVolume = function(globalVolume) {
  24. Polycode.SoundManager_setGlobalVolume(this.__ptr, globalVolume)
  25. }
  26. SoundManager.prototype.registerSound = function(sound) {
  27. Polycode.SoundManager_registerSound(this.__ptr, sound)
  28. }
  29. SoundManager.prototype.unregisterSound = function(sound) {
  30. Polycode.SoundManager_unregisterSound(this.__ptr, sound)
  31. }