title: Play Background Sound and Sound Effect in Windows Phone 8
body: <p>I have researched a lot on playing sounds for Windows Phone 8 devices and found multiple solutions but they don't quite match my case.</p>
  
  <p>What I need : I'm writing an app (C#+XAML) that uses a file as background sound (must be active while navigating the whole app), and also to be able to play sound effects.</p>
  
  <p>What are the issues :</p>
  
  <ul>
  <li>For background sound I could use the <code>BackgroundAudio</code> Agent, but it doesn't meet my requirements because I want the sound to be played only in the background of my app, and to stop if my app closes or is not active.</li>
  <li>For sound effects - I tried <code>MediaElement</code> which is okay, but I couldn't manage to make it somehow play while I am navigating the whole app. Media closes if I leave that page - I guess I could use this for the sound effects trick. Also, there's the <code>SoundEffect</code> which is not quite a good solution since it can play only .wav files... I could use it for sound effects only but not background sound (big sized files).</li>
  </ul>
  
  <p>So, how should I proceed to play background sound (only inside my app) if I choose MediaElement/SoundEffect to play a sound effect in the app. I need a solution that would allow me to play 2 sounds at once (background and sound effect) and the background sound to be played only while the app runs (is active)... </p>
  
  <p>So far I am confused and managed only to solve the sound effects issue.</p>
  
  <p>Any suggestions are greatly appreciated.</p>