SHARE
TWEET

Untitled

a guest Jun 15th, 2019 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (audioSource, audioCount) = soundFileSelect(audioFileIndex: 0)
  2.     audioSource?.isPositional = true
  3.     if vol {
  4.         audioSource?.volume = 1.0
  5.     }
  6.     else {
  7.         audioSource?.volume = 0.0
  8.     }
  9.     let audioPlayer = SCNAudioPlayer(source: audioSource!)
  10.     geometryNode.addAudioPlayer(audioPlayer)
  11.     let play = SCNAction.playAudio(audioSource!, waitForCompletion: true)
  12.     let loopPlay = SCNAction.repeatForever(play)
  13.     geometryNode.runAction(loopPlay)
  14.      
  15. audioPlayer.audioNode?.engine?.mainMixerNode.outputVolume=0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top