title: How to lower the volume of music in swift?
body: <p>I am creating a SpriteKit Game with background music looping. The problem is that the music is too loud. How do I lower the volume?</p>
  
  <p>Here is the code I used to set up the music</p>
  
  <pre><code>    var backGroundMusic = AVAudioPlayer()
      var bgMusicUrl:NSURL = NSBundle.mainBundle().URLForResource("BackGround", withExtension: "wav")
      backGroundMusic = AVAudioPlayer(contentsOfURL:bgMusicUrl, error: nil)
      backGroundMusic.numberOfLoops = (-1)
      backGroundMusic.prepareToPlay()
      backGroundMusic.play()
  </code></pre>