title: AVAudioPlayer playing overtime viewcont. loads [Swift]
body: <p>In my mainmenuviewcontroller in <code>viewDidLoad</code>, I tell it to play a background song. Problem is, when a user goes to another view and then goes back to the main menu, it starts playing the song again, and the two copies overlap. I tried to put this in the <code>viewDidLoad</code> but it didn't work</p>
  
  <pre><code>if themePlayer.playing == false {
  
  themePlayer.prepareToPlay()
  
  themePlayer.play()
  
  }
  </code></pre>
  
  <p>It just kind of ignores the if condition and plays anyways. How can I fix this? </p>