I am working on my first game. I was using SKAction.playSoundFileNamed() to play .wav files in my assets, but this was causing problematic memory use growth. After looking online and reading that method has been linked to leaks, I switched to SKAudioNodes. I have added many of those to my scene, and they work, but the frame rate is lower now than before. Any suggestions?
I had used this (but I had memory usage growing):
let hiss = SKAction.playSoundFileNamed("hiss.wav", waitForCompletion: false)
run(hiss)
Now I have this (but frame rates are down):
let hiss: SKAudioNode = SKAudioNode(fileNamed: "hiss.wav")
hiss.autoplayLooped = false
hiss.isPositional = false
addChild(hiss)
hiss.run(SKAction.play())
Any tips?