/*----------------------------------------------------------------
For audio test purpose, creating a single buffer used all the time
-----------------------------------------------------------------*/
unsigned char TestBuffer[AUOUTBUFSIZE];

// there is a call back on this function !!
if( res1 == MMSYSERR_NOERROR ) // do it only if reset was accepted
GetMessage( &Msg,hParentWnd,MM_WIM_CLOSE,MM_WIM_CLOSE);
//if( Msg.message != MM_WIM_CLOSE ) MessageBox(NULL,"Picked a msg != from MM_WIM_CLOSE \r\n","CloseAll",MB_OK); //c14

MMWomClose(); //c27 added here because the call back is not
// working in this case
while( (res2=waveOutClose(hWaveOut))!= MMSYSERR_NOERROR )
{
res1 = waveOutReset(hWaveOut);
MessageBox(NULL,"Audio Out not properly closed","CloseAll",MB_OK);
}