#include <iostream>
using std::cout;
using std::endl;

#include <tchar.h>
#include <windows.h>
#include "winsnd.hpp"


int realTime( void )
{
	if (!SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS)) {
		return 1;
	} else {
		return 0;
   }
}



int hiTime( void )
{
	if (!SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS)) {
		return 1;
	} else {
		return 0;
   }

}


int wplay( const char * pch )
{
	int ok=realTime();
	if (1==ok) cout<<"FAILed to raise priority"<<endl;

	BOOL ret = PlaySound( pch, NULL, SND_ASYNC | SND_FILENAME );
	if (true==ret) return 0;
	else return 1;
}

