I can't make a simple SKAudioNode test to work. Can somebody help. Here's what I trying to do:
Initialization:
let soundURL = NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("TestSound", ofType: "caf")!)
soundNode = SKAudioNode(URL: soundURL)
soundNode.autoplayLooped = false
self.addChild(soundNode)
Then when running play action:
soundNode.runAction(SKAction.play())
It crashes at that point with EXC_BAD_ACCESS at thread point libAVFAudio.dylib`AVAudioFileImpl::CheckClientFormatSet:
The same TestSound.caf plays correctly with:
soundNode.runAction(SKAction.playSoundFileNamed("TestSound.caf", waitForCompletion: false))
What am I doing wrong?