#ifndef _SNDCD_H_
#define _SNDCD_H_

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/


/* ++++++++++++++++++++++++++++++++++++*/
/* + Macro de compilation en mode DLL +*/  
/* ++++++++++++++++++++++++++++++++++++*/

#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(DLLCD_MODULE)
    #pragma message("-> sndcd : functions pointers defined in SNDDLL.H")
#else
/*---------------------------------------*/
/*- Prototypes des fonctions CD driver  -*/
/*---------------------------------------*/

DLL_IMPEXP SndBool  SND_CALL SND_fn_bLoadResScriptCd(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
DLL_IMPEXP SndBool  SND_CALL SND_fn_bLoadResBinaryCd(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,char *pDataBloc);
DLL_IMPEXP SndBool  SND_CALL SND_fn_bSetParamCD(long voice,SoundParam *par);
DLL_IMPEXP SndBool  SND_CALL SND_fn_bTestInitCD(void);
DLL_IMPEXP SndBool  SND_CALL SND_fn_bTestIsPlayingCD(long voice);
DLL_IMPEXP int      SND_CALL SND_fn_iInitCD(SND_tdstInitStruct *pInitStruct);
DLL_IMPEXP long     SND_CALL SND_fn_lNextCDTrack();
DLL_IMPEXP long	    SND_CALL SND_fn_lPlayCD(tduRefRes res,SoundParam *par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback);
DLL_IMPEXP long     SND_CALL SND_fn_lPlayCDWithFade(tduRefRes res,SoundParam *par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback,unsigned long ulFadeIn,unsigned long ulFadeOut);
/*DLL_IMPEXP void     SND_CALL SND_fn_vConvertResDiskToMemCD(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,void* ptrBegin);*/
DLL_IMPEXP void     SND_CALL SND_fn_vDesInitCD(void);
DLL_IMPEXP void     SND_CALL SND_fn_vPauseCD(long voice);
DLL_IMPEXP void     SND_CALL SND_fn_vRemoveCallbackCD(long voice);
DLL_IMPEXP void	    SND_CALL SND_fn_vResumeCD(long voice);
DLL_IMPEXP void	    SND_CALL SND_fn_vStopCD(long voice);
DLL_IMPEXP void	    SND_CALL SND_fn_vStopCDWithFade(long voice,unsigned long ulFadeOutDuration);
DLL_IMPEXP void		SND_CALL SND_fn_vReleaseDriverCD(void);
DLL_IMPEXP void		SND_CALL SND_fn_vRestoreDriverCD(void);
DLL_IMPEXP SndReal	SND_CALL SND_fn_rGetPosCD(long voice);
DLL_IMPEXP SndReal	SND_CALL SND_fn_rGetLengthCD(long voice);
DLL_IMPEXP void		SND_CALL SND_fn_vSynchroCD(void);
DLL_IMPEXP SndBool  SND_CALL SND_fn_bCheckVersionResourceCD(tdstBlockResourceDisk* disk);
DLL_IMPEXP SndBool  SND_CALL SND_fn_bSetResourceStaticVolumeCD(tdstBlockResourceMem* pstRes,unsigned char ucVolume);
#endif /*dll*/

#ifdef __cplusplus
}
#endif /* __cplusplus*/

#endif /*_SNDCD_H_*/

