#include "stdafx.h"
#include "speaker.h"
extern BOOL  g_bSBOpen;
///////////////////////////////////////////////////////////
////// PlaySound
BOOL PlaySound(LPCSTR lpszSound)
{     
    if(!g_bSBOpen)
       return 0;
	BOOL bOk = FALSE;           
		// found the resource, play it
	 bOk = sndPlaySound(lpszSound,SND_ASYNC|SND_NODEFAULT);//SND_LOOP);//|
/*    
	if (!bOk)
	{
     AfxMessageBox( "Tutorial Cannot find Sound Blaster card.\n"
	  			   "This demo works much better with a sound card!.");
	}
*/
	return bOk;
}

BOOL PlaySound(UINT nIDS)
     { return PlaySound(MAKEINTRESOURCE(nIDS)); };
