title: explosion sound thread in MFC game project is stopping the music that is playing
body: <p>Mabye someone over here can explain to me what am I doing wrong. This is after reading a lot of articles over the net and doing what the articles say should work but it is not working for me.</p>
  
  <p>I am developing a nice little game with a background music and an explosion sound. For the explosion I know I need to use threads or my music stops when the first explosion happens. I am using threads but the music still stops.</p>
  
  <p>I need the background music to keep on playing all the time and it should continue playing during and after the explosion sound. I tried playing the explosion sync, It doesn't make any difference, the background sound stops playing the second the thread method is triggered.</p>
  
  <p>Here is my code. It is very simple, but the explosion sound is not working.</p>
  
  <ol>
  <li><p>This is the GLOBAL decleration in the *.h file:</p>
  
  <p><code>UINT CMonstersThread(LPVOID Param);</code></p></li>
  <li><p>This is the thread function in the *.cpp file:</p></li>
  </ol>
  
  <pre>    UINT CMonstersThread(LPVOID Param)
      {
          PlaySoundA("sounds\\expl06.wav", NULL, SND_ASYNC);
          AfxEndThread(0);
          return FALSE;
      }
  </pre>
  
  <ol start="3">
  <li><p>This is the call for the thread every time a "friendly" is hit, (in the same *.cpp file):</p>
  
  <p><code>AfxBeginThread(CMonstersThread,NULL,THREAD_PRIORITY_NORMAL,0,0,NULL);</code></p></li>
  </ol>
  
  <p>That is all my code. And from what I got over the web, it should work but isn't playing the music continuously while making explosion sounds as I expect it should.</p>