#ifndef _SNDXDAPM_H_
#define _SNDXDAPM_H_
 
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
 
/*
//////////////////////////////////////////////////////////////
//	SNDXDAPM.H												//
//////////////////////////////////////////////////////////////
//	Module d'exploitation des samples 3D en ADPCM			//
//////////////////////////////////////////////////////////////
*/
#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(DLLADPCM_MODULE)
    #pragma message("-> sndxdapm : functions pointers defined in SNDDLL.H")
#else
	DLL_IMPEXP CPA_EXPORT long		SND_CALL SND_fn_lPlaySxdADPCM(tduRefRes res,SoundParam *par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback);
	DLL_IMPEXP CPA_EXPORT void		SND_CALL SND_fn_vRemoveCallbackSxdADPCM(long voice);
	DLL_IMPEXP CPA_EXPORT SndBool	SND_CALL SND_fn_bSetParamSxdADPCM(long voice,SoundParam *par);
	DLL_IMPEXP CPA_EXPORT SndBool	SND_CALL SND_fn_bTestIsPlayingSxdADPCM(long voice);
	DLL_IMPEXP CPA_EXPORT void		SND_CALL SND_fn_vStopSxdADPCM(long voice);
	DLL_IMPEXP CPA_EXPORT void		SND_CALL SND_fn_vPauseSxdADPCM(long voice);
	DLL_IMPEXP CPA_EXPORT void		SND_CALL SND_fn_vResumeSxdADPCM(long voice);
 
	DLL_IMPEXP CPA_EXPORT SndBool	SND_CALL SND_fn_bIsResourceLoopingSxdADPCM(tduRefRes res);
	DLL_IMPEXP CPA_EXPORT SndReal	SND_CALL SND_fn_rGetPosSxdADPCM(long voice);
	DLL_IMPEXP CPA_EXPORT SndReal	SND_CALL SND_fn_rGetLengthSxdADPCM(long voice);
	DLL_IMPEXP CPA_EXPORT void		SND_CALL SND_fn_vSetSoundVolumeSxdADPCM(unsigned char vol);
 
	DLL_IMPEXP CPA_EXPORT unsigned char SND_CALL SND_fn_ucGetSoundVolumeSxdADPCM();
	DLL_IMPEXP CPA_EXPORT void		SND_CALL SND_fn_vSetStereoSxdADPCM(SndBool active);
	DLL_IMPEXP CPA_EXPORT SndBool	SND_CALL SND_fn_bGetStereoSxdADPCM(void);
	DLL_IMPEXP CPA_EXPORT void		SND_CALL SND_fn_vSetReverseStereoSxdADPCM(SndBool active);
	DLL_IMPEXP CPA_EXPORT SndBool	SND_CALL SND_fn_bGetReverseStereoSxdADPCM(void);
 
	DLL_IMPEXP CPA_EXPORT int		SND_CALL SND_fn_iInitSxdADPCM(SND_tdstInitStruct *pInitStruct);
	DLL_IMPEXP CPA_EXPORT SndBool	SND_CALL SND_fn_bTestInitSxdADPCM(void);
	DLL_IMPEXP CPA_EXPORT void		SND_CALL SND_fn_vDesInitSxdADPCM(void);
 
	DLL_IMPEXP CPA_EXPORT void		SND_CALL SND_fn_vSetEffectSxdADPCM(long num);
 
	DLL_IMPEXP CPA_EXPORT void		SND_CALL SND_fn_vCreateMicroSxdADPCM(MicroParam* par,long id);
	DLL_IMPEXP CPA_EXPORT void		SND_CALL SND_fn_vSetMicroParamSxdADPCM(long sxdId,MicroParam* par);
	DLL_IMPEXP CPA_EXPORT void		SND_CALL SND_fn_vDestroyMicroSxdADPCM(long sxdId);
 
	/*gestion de buffers*/
	DLL_IMPEXP CPA_EXPORT long		SND_CALL SND_fn_lCreateNewBufferSxdADPCM(unsigned long nb_samples,unsigned short uwResolution,unsigned short uwNbChannels,unsigned long ulFreq,SoundParam* par,td_pfn_vRefreshBufferClient callback,long user_id);
	DLL_IMPEXP CPA_EXPORT void		SND_CALL SND_fn_vSetParamBufferSxdADPCM(long id_buffer,SoundParam *par);
	DLL_IMPEXP CPA_EXPORT void		SND_CALL SND_fn_vDeleteBufferSxdADPCM(long id_buffer);
	DLL_IMPEXP CPA_EXPORT void		SND_CALL SND_fn_vPauseBufferSxdADPCM(long id_buffer);
	DLL_IMPEXP CPA_EXPORT void		SND_CALL SND_fn_vResumeBufferSxdADPCM(long id_buffer);
	DLL_IMPEXP CPA_EXPORT void*		SND_CALL SND_fn_pvGetPtrBufferSxdADPCM(long id_buffer);
	DLL_IMPEXP CPA_EXPORT SndReal	SND_CALL SND_fn_rGetPosBufferSxdADPCM(long id_buffer);
 
	DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bLoadResScriptSxdADPCM(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
	DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bLoadResBinarySxdADPCM(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,char *pDataBloc);
	DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bLoadResScriptAndConvertToWAVSxdADPCM(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
	DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bLoadResBinaryAndConvertToWAVSxdADPCM(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,char *pDataBloc);
 
	DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vUnLoadResSxdADPCM(tdstBlockResourceMem* mem);
	DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bIsResLoadedSxdADPCM(tdstBlockResourceMem *mem);
 
	/*---themes*/
	DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lPlayTransitionSxdADPCM(tduRefRes FirstRes,tduRefRes NextRes,SND_td_pfn_vSoundCallback transition_callback,long param_callback,SoundParam* par);
	DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bSetParamTransitionSxdADPCM(long voice,SoundParam *par);
	DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bSetNextTransitionSxdADPCM(long voice,tduRefRes new_res);
	DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bDoTransitionWithFadeSxdADPCM(long voice,tduRefRes new_res);
	DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bDoTransitionWithFadeSxdADPCM2( long voice, tduRefRes new_res, SndReal rDuration );
	DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vStopTransitionSxdADPCM(long voice);
	DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vPauseTransitionSxdADPCM(long voice);
	DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vResumeTransitionSxdADPCM(long voice);
 
#ifndef NO_ACP_LDBIN
	DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bCanFreeDataADPCM(void);
#endif
 
	 /*--relache-reprise a chaud des drives*/
	DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vReleaseDriverSxdADPCM(void);
	DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vRestoreDriverSxdADPCM(void);
 
	DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vGetTargetLabelSxdADPCM(char* name,int nb_char);
	DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSetupTargetSxdADPCM();
	DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bCanSetupTargetSxdADPCM();
 
	DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSynchroSxdADPCM();
 
	DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lCreateNewBufferExSxdADPCM(SND_tdstFormat* pformat,SND_tdstCallback* pCallback,SoundParam* par,long user_id);
	DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lGetPosBufferExSxdADPCM(long id_buffer);
	DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lPushBufferExSxdADPCM(long id_buffer,SND_tdstStackBuffer* pStack);
 
	DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSetDefaultRollOffSxdADPCM(RollOffParam* rolloff);
 
	DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bCheckVersionResourceSxdADPCM(tdstBlockResourceDisk* disk);
 
	DLL_IMPEXP CPA_EXPORT long SND_CALL	SND_fn_lGetNbVoiceWishedSxdADPCM();
	DLL_IMPEXP CPA_EXPORT SndBool SND_CALL	SND_fn_bIsLibActiveSxdADPCM();
		
	DLL_IMPEXP CPA_EXPORT SndBool SND_CALL	SND_fn_bSetResourceStaticVolumeSxdADPCM(tdstBlockResourceMem* pstRes,unsigned char ucVolume);

#endif
 
#ifdef __cplusplus
}
#endif /* __cplusplus*/
 
#endif /*_SNDXDAPM_H_*/
 
