title: Soundeffect not playing in background
body: <p>I have an application that allows the user to take photos and save to isolated storage for upload to a server.
  I am trying to play a shutter sound when the user clicks the software capture button provided.  All documentation I can find indicates that soundeffect.play is asynchronous so the sound should keep playing in the background while logic continues, however in my case the sound either only partially plays or does not have time to play unless I put a breakpoint just after play() or add a Thread.Sleep(x) just after the call to play().  </p>
  
  <pre><code>private void BtnCaptureClick(object Sender, RoutedEventArgs E)
  {
      if (_PhotoCamera != null)
      {
      PlayShutter();
  
      _FileName = Guid.NewGuid().ToString(); //A breakpoint here will allow sound to play
      _PhotoCamera.CaptureImage();
      }
  }
  
  private void PlayShutter()
  {
      var Info = App.GetResourceStream(new Uri("Assets/camera.wav", UriKind.Relative));
  
      try
      {
      _Effect = SoundEffect.FromStream((Info.Stream));
      FrameworkDispatcher.Update();
  
      using (_Effect)
      {
          if (_Effect.Play())
          {
      //Thread.Sleep(1000); //uncommenting this will allow sound to play if duration &lt; 1000
          }
      }
      }
      catch (Exception Ex)
      {
      MessageBox.Show(Ex.Message);
      }
  }
  </code></pre>
  
  <ul>
  <li>I have tried using a soundeffectinstance explicitly, however behaviour does not change.</li>
  <li>I have tried explicitly calling Play() asynchronously, no change in behaviour.</li>
  <li>I have tried calling the following code asynchronously, no change in behaviour.</li>
  <li>I have tried calling FrameworkDispatcher.Update frequently, no change in behaviour.</li>
  <li>I have tried setting the .wav file in the project to “Resource” but this causes a nullreferenceexception when I call _Effect = SoundEffect.FromStream((Info.Stream)); because Info is null.(even with an absolute path) </li>
  </ul>
  
  <p>This behaviour is present using both the emulator and an actual device via usb connection to pc to debug.</p>
  
  <p>Can anybody help me resolve this frustrating issue please?</p>