Swift sound in game

Good afternoon.

Poser: have a background track, there are sound effects.

If you make a sound through AVAudioPlayer, the observed lags.

If done through SKAction.playSoundFileNamed, the following happens - every time you call play a sound (short), the sound level is different.

Someone tell me how to play background track and sound effects.

Thank you

Swift sound in game
 
 
Q