#ifndef _SNDTHRD_H_
#define _SNDTHRD_H_
 
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
 
/*
//////////////////////////////////////////////////////////////
//	SNDMEM.H												//
//////////////////////////////////////////////////////////////
//	Module de gestion du multithread et la reentrance		//
//////////////////////////////////////////////////////////////
*/
 
#undef DLL_IMPEXP
#undef CPA_EXPORT
#ifdef _DLL_COMPILATION_MODE
	#define DLL_IMPEXP __declspec(dllexport)
	#define CPA_EXPORT
#else
	#define DLL_IMPEXP
	/****************************************/
	#if defined(CPA_WANTS_IMPORT)
	#define CPA_EXPORT __declspec(dllimport)
	#elif defined(CPA_WANTS_EXPORT)
	#define CPA_EXPORT __declspec(dllexport)
	#else
	#define CPA_EXPORT
	#endif
	/****************************************/
#endif
 
#if defined(_DLL_COMPILATION_MODE) && !defined(SNDDLL_MODULE)
    #pragma message("-> sndthrd : functions pointers defined in SNDDLL.H")
#else
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vInitThreadSnd();
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vDesInitThreadSnd();
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vEnterCriticalSectionThreadSnd_();
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vEnterCriticalSectionWithMsgPumpThreadSnd();
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bTryToEnterCriticalSectionThreadSnd();
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vQuitCriticalSectionThreadSnd();
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vMouchardThreadsnd(char* file,int line);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vWaitForValueThreadSnd(long* ptr,long val);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vEnterCriticalSectionForErrorDisplay(void);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vQuitCriticalSectionForErrorDisplay(void);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bEnterCriticalSectionForDriverThreadSnd(void);
/*DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vStartCallbackThreadsnd(SND_td_pfn_vSoundCallback pfn,long param);*/
#endif
 
#define SND_fn_vEnterCriticalSectionThreadSnd()	\
{												\
SND_fn_vEnterCriticalSectionThreadSnd_();		\
SND_fn_vMouchardThreadsnd(__FILE__,__LINE__);	\
}
 
#ifdef __cplusplus
}
#endif /* __cplusplus*/
 
#endif /*_SNDTHRD_H_*/
 
