title: Playsound skipping first half-second of file unless a music player program happens to be running
body: <p>I have some very short (&lt;1-2 second) WAV files which are not playing reliably.  On a fast Windows 8 machine, they never play unless some kind of audio player (windows Media Player, iTunes) happens to be open and has played something (anything), and then they play every time. </p>
  
  <p>I have other (also short) WAV files which do play every time.  From the exact same call.  They all reside in the program's directory.</p>
  
  <p>When they don't play, Playsound still returns true. Here is the win32 C++ call:</p>
  
  <pre><code>    Playsound( L"mfile.wav", NULL, SND_ASYNC | SND_FILENAME );
  </code></pre>
  
  <p>It seems that this test computer (and presumably other Windows 8 systems) has some kind of optimization which takes a while to "warm up" the sound system.  Even if I ask Windows Media Player to play one of the file, no sound comes out ... the first time.  But when I click play from then on, it plays fine every time.  iTunes takes a long time to decide to play the file, and then it always works.  Turning on/off sound enhancements via Control Panel has no effect.</p>
  
  <p>Any ideas?  Is there something I can do to "activate" the sound system like theses media players do?  Because my sound won't play the first time, or ever, unless one of these other programs is running.</p>