Xcode 8 Swift 3 Pitch-altering sounds
问题 So, I asked this question before on the Apple Developer Forums but never got a proper answer, so I thought I'd ask it here: I'm trying to make a simple game with a hit sound that has a different pitch whenever you hit something. I thought it'd be simple, but it ended up with a whole lot of stuff (most of which I completely copied from someone else): func hitSound(value: Float) { let audioPlayerNode = AVAudioPlayerNode() audioPlayerNode.stop() engine.stop() // This is an AVAudioEngine defined