i am a swift beginner trying to build a game with a sound in it. i use swift SpriteKit and also AVFoundation as my sound starter. Below is the action i call whenever i want a sound action in the game. The sound (background music) plays alright but just wouldn't stop when the game is over.
self.runAction(SKAction.playSoundFileNamed("Sound/Gameplay.wav", waitForCompletion: false))
Can somebody please help me get this issue behind me? thanks.