title: Playing a .wav file in c# using SoundPlayer
body: <p>I am currently having a probelm, where a file was sent to me as .m4a and I renamed it to .wav..... (I think that is the issue as I can play other .wav files)</p>
  
  <p>Now it is giving me this error when I run the code:</p>
  
  <blockquote>
    <p>Additional information: The file located at c:\Windows\Media\dj.wav is not a valid wave file.</p>
  </blockquote>
  
  <p>Maybe I just need to change it back to .m4a and then have some website convert it to .wav compared to me just renaming it?</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>using System.Media;
  
  
  playSimpleSound();
  
  
  
  private void playSimpleSound()
      {
          SoundPlayer simpleSound = new SoundPlayer(@"c:\Windows\Media\dj.wav");
          simpleSound.Play();
      }
  </code></pre>
  
  <p>Also, how can I write my path, so that it would hit the file in the debug folder? Because I am going to deploy this to a thin client in another building.</p>