title: C#4.0 Issues playing .mp3 files over 192kbps using winmm.dll
body: <p>MCIERR_INTERNALI am trying to make a simple Media player inside an app, but I've noticed that my code WILL NOT play music unless the file is a low bitrate around 192kbps or less. The issue is that most of my music is around 260-320kbps.</p>
  
  <p>Here's my code, if there's something I can do to up the 'available' bitrate options let me know, otherwise I'll need a new DLL suggestion please!</p>
  
  <pre><code>class MusicPlayer
  {
      [DllImport("winmm.dll")]
      private static extern long mciSendString(string lpstrCommand, StringBuilder lpstrReturnString, int uReturnLength, int hwndCallback);
  
      private static void checkMCIResult(long code)
      {
          int err = (int)(code &amp; 0xffffffff);
          if (err != 0)
          {
              throw new Exception(string.Format("MCI error {0}", err));
          }
      }
  
      public void open(string file)
      {
          string command = "open \"" + file + "\" type MPEGVideo alias MyMp3";
          checkMCIResult(mciSendString(command, null, 0, 0));
      }
  
      public void play()
      {
          string command = "play MyMp3";
          mciSendString(command, null, 0, 0);
      }
      public void pause()
      {
          string command = "stop MyMp3";
          mciSendString(command, null, 0, 0);
      }
  }
  </code></pre>
  
  <p>**EDIT:
  -Winform application</p>
  
  <p>-using Windows 7 sp1</p>
  
  <p>-Using Visulal Studio 2013 community edition</p>
  
  <p>-From error catching I now see the error number is 289, -256 = 22: MCIERR_INTERNAL, not sure what that's all about</p>