Add rayman2 source files

This commit is contained in:
2024-09-18 02:33:44 +08:00
parent bcc093f8ed
commit fb036c54fd
14339 changed files with 2596224 additions and 0 deletions

View File

@@ -0,0 +1,97 @@
#ifndef _SNDMIDI_H_
#define _SNDMIDI_H_
/*#include "sndtype.h"*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
extern char SND_gszMidiMDXFakePartName[13];
/* ++++++++++++++++++++++++++++++++++++*/
/* + 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("-> sndmidi : functions pointers defined in SNDDLL.H")
#else
/*----------------------------------------*/
/*- Prototypes des fonctions Midi driver -*/
/*----------------------------------------*/
DLL_IMPEXP SndBool SND_CALL SND_fn_bLoadResScriptMidi(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
DLL_IMPEXP SndBool SND_CALL SND_fn_bLoadResBinaryMidi(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,char *pDataBloc);
DLL_IMPEXP SndBool SND_CALL SND_fn_bIsResLoadedMidi(tdstBlockResourceMem* _pBRMem);
DLL_IMPEXP SndBool SND_CALL SND_fn_bSetParamMidi(long voice,SoundParam *par);
DLL_IMPEXP SndBool SND_CALL SND_fn_bTestInitMidi(void);
DLL_IMPEXP SndBool SND_CALL SND_fn_bTestIsPlayingMidi(long voice);
/*DLL_IMPEXP SndBool SND_fn_bUnloadMidiRes(tduRefRes RR);*/
DLL_IMPEXP int SND_CALL SND_fn_iInitMidi(SND_tdstInitStruct *pInitStruct);
DLL_IMPEXP long SND_CALL SND_fn_lPlayMidi(tduRefRes res,SoundParam *par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback);
DLL_IMPEXP long SND_CALL SND_fn_lPlayMidiWithFade(tduRefRes res,SoundParam *par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback,unsigned long ulFadeIn,unsigned long ulFadeOut);
DLL_IMPEXP long SND_CALL SND_fn_lPlayMidiWithFadeIn(tduRefRes res,SoundParam *par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback,unsigned long ulFadeIn);
/*DLL_IMPEXP void SND_CALL SND_fn_vConvertResDiskToMemMidi(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,void* ptrBegin);*/
DLL_IMPEXP void SND_CALL SND_fn_vDesInitMidi(void);
/*DLL_IMPEXP void SND_CALL SND_fn_vLoadResFromDiskMidi(tdstBlockResourceDisk* disk,tdstBlockResourceMem* mem);*/
DLL_IMPEXP void SND_CALL SND_fn_vPauseMidi(long voice);
DLL_IMPEXP void SND_CALL SND_fn_vResumeMidi(long voice);
DLL_IMPEXP void SND_CALL SND_fn_vRemoveCallbackMidi(long voice);
/*DLL_IMPEXP void SND_CALL SND_fn_vSetResUnloadedMidi(tdstBlockResourceMem *pResMem);*/
DLL_IMPEXP void SND_CALL SND_fn_vStopMidi(long voice);
DLL_IMPEXP void SND_CALL SND_fn_vStopMidiWithFadeOut(long voice,unsigned long ulFadeOut);
DLL_IMPEXP void SND_CALL SND_fn_vUnLoadResMidi(tdstBlockResourceMem* mem);
DLL_IMPEXP SndReal SND_CALL SND_fn_rGetPosMidi(long voice);
DLL_IMPEXP SndReal SND_CALL SND_fn_rGetLengthMidi(long voice);
#ifndef NO_ACP_LDBIN
DLL_IMPEXP SndBool SND_CALL SND_fn_bCanFreeDataMidi(void);
#endif
DLL_IMPEXP void SND_CALL SND_fn_vReleaseDriverMidi(void);
DLL_IMPEXP void SND_CALL SND_fn_vRestoreDriverMidi(void);
DLL_IMPEXP void SND_CALL SND_fn_vSynchroMidi();
DLL_IMPEXP long SND_CALL SND_fn_lPlayTransitionMidi(tduRefRes FirstRes,tduRefRes NextRes,SND_td_pfn_vSoundCallback transition_callback,long param_callback,SoundParam* par);
DLL_IMPEXP SndBool SND_CALL SND_fn_bSetParamTransitionMidi(long voice,SoundParam* par);
DLL_IMPEXP SndBool SND_CALL SND_fn_bSetNextTransitionMidi(long voice,tduRefRes new_res);
DLL_IMPEXP void SND_CALL SND_fn_vStopTransitionMidi(long voice);
DLL_IMPEXP void SND_CALL SND_fn_vResumeTransitionMidi(long voice);
DLL_IMPEXP void SND_CALL SND_fn_vPauseTransitionMidi(long voice);
DLL_IMPEXP SndBool SND_CALL SND_fn_bDoTransitionWithFadeMidi(long voice,tduRefRes new_res);
DLL_IMPEXP SndBool SND_CALL SND_fn_bDoTransitionWithFadeMidi2( long voice, tduRefRes new_res, SndReal rDuration );
DLL_IMPEXP SndBool SND_CALL SND_fn_bCheckVersionResourceMidi(tdstBlockResourceDisk* disk);
DLL_IMPEXP SndBool SND_CALL SND_fn_bSetResourceStaticVolumeMidi(tdstBlockResourceMem* pstRes,unsigned char ucVolume);
#endif /*dll*/
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SNDMIDI_H_*/

View File

@@ -0,0 +1,127 @@
#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_*/

View File

@@ -0,0 +1,108 @@
#ifndef _SNDADPCM_H_
#define _SNDADPCM_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/*
//////////////////////////////////////////////////////////////
// SNDADPCM.H //
//////////////////////////////////////////////////////////////
// Module d'exploitation des samples 2D en ADPCM //
//////////////////////////////////////////////////////////////
*/
#undef CPA_EXPORT
/**************************************/
#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
/**************************************/
CPA_EXPORT long SND_fn_lPlaySampleADPCM(tduRefRes res,SampleParam *par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback);
CPA_EXPORT void SND_fn_vRemoveCallbackSampleADPCM(long voice);
CPA_EXPORT SndBool SND_fn_bSetParamSampleADPCM(long voice,SampleParam *par);
CPA_EXPORT SndBool SND_fn_bTestIsPlayingSampleADPCM(long voice);
CPA_EXPORT void SND_fn_vStopSampleADPCM(long voice);
CPA_EXPORT void SND_fn_vPauseSampleADPCM(long voice);
CPA_EXPORT void SND_fn_vResumeSampleADPCM(long voice);
CPA_EXPORT SndBool SND_fn_bIsResourceLoopingSampleADPCM(tduRefRes res);
CPA_EXPORT SndReal SND_fn_rGetPosSampleADPCM(long voice);
CPA_EXPORT SndReal SND_fn_rGetLengthSampleADPCM(long voice);
CPA_EXPORT void SND_fn_vSetSoundVolumeSampleADPCM(unsigned char vol);
CPA_EXPORT unsigned char SND_fn_ucGetSoundVolumeSampleADPCM();
CPA_EXPORT void SND_fn_vSetStereoSampleADPCM(SndBool active);
CPA_EXPORT SndBool SND_fn_bGetStereoSampleADPCM(void);
CPA_EXPORT void SND_fn_vSetReverseStereoSampleADPCM(SndBool active);
CPA_EXPORT SndBool SND_fn_bGetReverseStereoSampleADPCM(void);
CPA_EXPORT int SND_fn_iInitSampleADPCM(SND_tdstInitStruct *pInitStruct);
CPA_EXPORT SndBool SND_fn_bTestInitSampleADPCM(void);
CPA_EXPORT void SND_fn_vDesInitSampleADPCM(void);
CPA_EXPORT void SND_fn_vSetEffectSampleADPCM(long num);
CPA_EXPORT void SND_fn_vCreateMicroSampleADPCM(MicroParam* par,long id);
CPA_EXPORT void SND_fn_vSetMicroParamSampleADPCM(long sxdId,MicroParam* par);
CPA_EXPORT void SND_fn_vDestroyMicroSampleADPCM(long sxdId);
/*gestion de buffers*/
CPA_EXPORT long SND_fn_lCreateNewBufferSampleADPCM(unsigned long nb_samples,unsigned short uwResolution,unsigned short uwNbChannels,unsigned long ulFreq,SampleParam* par,td_pfn_vRefreshBufferClient callback,long user_id);
CPA_EXPORT void SND_fn_vSetParamBufferSampleADPCM(long id_buffer,SampleParam *par);
CPA_EXPORT void SND_fn_vDeleteBufferSampleADPCM(long id_buffer);
CPA_EXPORT void SND_fn_vPauseBufferSampleADPCM(long id_buffer);
CPA_EXPORT void SND_fn_vResumeBufferSampleADPCM(long id_buffer);
CPA_EXPORT void* SND_fn_pvGetPtrBufferSampleADPCM(long id_buffer);
CPA_EXPORT SndReal SND_fn_rGetPosBufferSampleADPCM(long id_buffer);
CPA_EXPORT SndBool SND_fn_bLoadResScriptSampleADPCM(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
CPA_EXPORT SndBool SND_fn_bLoadResBinarySampleADPCM(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,char *pDataBloc);
CPA_EXPORT SndBool SND_fn_bLoadResScriptAndConvertToWAVSampleADPCM(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
CPA_EXPORT SndBool SND_fn_bLoadResBinaryAndConvertToWAVSampleADPCM(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,char *pDataBloc);
CPA_EXPORT void SND_fn_vUnLoadResSampleADPCM(tdstBlockResourceMem* mem);
CPA_EXPORT SndBool SND_fn_bIsResLoadedSampleADPCM(tdstBlockResourceMem *mem);
/*---themes*/
CPA_EXPORT long SND_fn_lPlayTransitionSampleADPCM(tduRefRes FirstRes,tduRefRes NextRes,SND_td_pfn_vSoundCallback transition_callback,long param_callback,SampleParam* par);
CPA_EXPORT SndBool SND_fn_bSetParamTransitionSampleADPCM(long voice,SampleParam *par);
CPA_EXPORT SndBool SND_fn_bSetNextTransitionSampleADPCM(long voice,tduRefRes new_res);
CPA_EXPORT SndBool SND_fn_bDoTransitionWithFadeSampleADPCM( long voice, tduRefRes new_res, SndReal rDuration );
CPA_EXPORT void SND_fn_vStopTransitionSampleADPCM(long voice);
CPA_EXPORT void SND_fn_vPauseTransitionSampleADPCM(long voice);
CPA_EXPORT void SND_fn_vResumeTransitionSampleADPCM(long voice);
#ifndef NO_ACP_LDBIN
CPA_EXPORT SndBool SND_fn_bCanFreeDataSampleADPCM(void);
#endif
/*--relache-reprise a chaud des drives*/
CPA_EXPORT void SND_fn_vReleaseDriverSampleADPCM(void);
CPA_EXPORT void SND_fn_vRestoreDriverSampleADPCM(void);
CPA_EXPORT void SND_fn_vGetTargetLabelSampleADPCM(char* name,int nb_char);
CPA_EXPORT void SND_fn_vSetupTargetSampleADPCM();
CPA_EXPORT SndBool SND_fn_bCanSetupTargetSampleADPCM();
CPA_EXPORT void SND_fn_vSynchroSampleADPCM();
CPA_EXPORT long SND_fn_lCreateNewBufferExSampleADPCM(SND_tdstFormat* pformat,SND_tdstCallback* pCallback,SoundParam* par,long user_id);
CPA_EXPORT long SND_fn_lGetPosBufferExSampleADPCM(long id_buffer);
CPA_EXPORT long SND_fn_lPushBufferExSampleADPCM(long id_buffer,SND_tdstStackBuffer* pStack);
CPA_EXPORT SndBool SND_fn_bCheckVersionResourceSampleADPCM(tdstBlockResourceDisk* disk);
CPA_EXPORT long SND_fn_lGetNbVoiceWishedSampleADPCM();
CPA_EXPORT SndBool SND_fn_bSetResourceStaticVolumeSampleADPCM(tdstBlockResourceMem* pstRes,unsigned char ucVolume);
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SNDADPCM_H_*/

View File

@@ -0,0 +1,19 @@
/* INCSND.H:*/
/* The absence of #ifndef/define is voluntary.It is not necessary and would complicate */
/* the Script->binary converter.*/
/* F.DECREAU*/
#include "SND\snddef.h"
#ifndef NO_ACP
/*#include "CPA_STD.h"*/
#endif
#if (!defined(NO_ACP_SCRIPT)||defined(SND_HYBRID_VERSION))
#include "SCR.h"
#endif
#include "SND.h"

View File

@@ -0,0 +1,27 @@
/* module de gestion des ressources samples PCM streamees*/
/* multi plateforme */
long SND_fn_lPlaySxdStream(tduRefRes res,SoundParam *par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback);
void SND_fn_vRemoveCallbackSxdStream(long voice);
SndBool SND_fn_bSetParamSxdStream(long voice,SoundParam *par);
SndBool SND_fn_bTestIsPlayingSxdStream(long voice);
void SND_fn_vStopSxdStream(long voice);
void SND_fn_vPauseSxdStream(long voice);
void SND_fn_vResumeSxdStream(long voice);
int SND_fn_iInitSxdStream(SND_tdstInitStruct *pInitStruct);
SndBool SND_fn_bTestInitSxdStream(void);
void SND_fn_vDesInitSxdStream(void);
SndReal SND_fn_rGetPosSxdStream(long voice);
SndReal SND_fn_rGetLengthSxdStream(long voice);
SndBool SND_fn_bLoadResScriptSxdStream(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
SndBool SND_fn_bLoadResBinarySxdStream(tdstBlockResourceDisk *_pBRDisk,tdstBlockResourceMem *_pBRMem,char *pDataBloc);
void SND_fn_vUnLoadResSxdStream(tdstBlockResourceMem* mem);
SndBool SND_fn_bSetResourceStaticVolumeSxdStream(tdstBlockResourceMem* pstRes,unsigned char ucVolume);
#ifdef PSX
long PlayStream(char* Name,unsigned int Length,char Channel,int nLoop);
void SetVolume(unsigned char Volume);
void StopStream();
void PauseStream();
void ResumeStream(void);
#endif

View File

@@ -0,0 +1,115 @@
#ifndef _SNDXDWAV_H_
#define _SNDXDWAV_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/*
//////////////////////////////////////////////////////////////
// SNDXDWAV.H //
//////////////////////////////////////////////////////////////
// Module d'exploitation des samples PCM en 3D //
//////////////////////////////////////////////////////////////
*/
#undef CPA_EXPORT
/****************************************/
#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
/****************************************/
CPA_EXPORT long SND_CALL SND_fn_lPlaySxdWave(tduRefRes res,SoundParam *par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback);
CPA_EXPORT void SND_CALL SND_fn_vRemoveCallbackSxdWave(long voice);
CPA_EXPORT SndBool SND_CALL SND_fn_bSetParamSxdWave(long voice,SoundParam *par);
CPA_EXPORT SndBool SND_CALL SND_fn_bTestIsPlayingSxdWave(long voice);
CPA_EXPORT void SND_CALL SND_fn_vStopSxdWave(long voice);
CPA_EXPORT void SND_CALL SND_fn_vPauseSxdWave(long voice);
CPA_EXPORT void SND_CALL SND_fn_vResumeSxdWave(long voice);
CPA_EXPORT SndBool SND_fn_bIsResourceLoopingSxdWave(tduRefRes res);
CPA_EXPORT SndReal SND_CALL SND_fn_rGetPosSxdWave(long voice);
CPA_EXPORT SndReal SND_CALL SND_fn_rGetLengthSxdWave(long voice);
CPA_EXPORT void SND_fn_vSetSoundVolumeSxdWave(unsigned char vol);
CPA_EXPORT unsigned char SND_fn_ucGetSoundVolumeSxdWave();
CPA_EXPORT void SND_fn_vSetStereoSxdWave(SndBool active);
CPA_EXPORT SndBool SND_fn_bGetStereoSxdWave(void);
CPA_EXPORT void SND_fn_vSetReverseStereoSxdWave(SndBool active);
CPA_EXPORT SndBool SND_fn_bGetReverseStereoSxdWave(void);
CPA_EXPORT void SND_fn_vSetDopplerFactorSxdWave(SndReal factor);
CPA_EXPORT int SND_fn_iInitSxdWave(SND_tdstInitStruct *pInitStruct);
CPA_EXPORT SndBool SND_fn_bTestInitSxdWave(void);
CPA_EXPORT void SND_fn_vDesInitSxdWave(void);
CPA_EXPORT void SND_fn_vSetEffectSxdWave(long num);
CPA_EXPORT void SND_fn_vCreateMicroSxdWave(MicroParam* par,long id);
CPA_EXPORT void SND_fn_vSetMicroParamSxdWave(long sxdId,MicroParam* par);
CPA_EXPORT void SND_fn_vDestroyMicroSxdWave(long sxdId);
/*gestion de buffers*/
CPA_EXPORT long SND_fn_lCreateNewBufferSxdWave(unsigned long nb_samples,unsigned short uwResolution,unsigned short uwNbChannels,unsigned long ulFreq,SoundParam* par,td_pfn_vRefreshBufferClient callback,long user_id);
CPA_EXPORT void SND_fn_vSetParamBufferSxdWave(long id_buffer,SoundParam *par);
CPA_EXPORT void SND_fn_vDeleteBufferSxdWave(long id_buffer);
CPA_EXPORT void SND_fn_vPauseBufferSxdWave(long id_buffer);
CPA_EXPORT void SND_fn_vResumeBufferSxdWave(long id_buffer);
CPA_EXPORT void* SND_fn_pvGetPtrBufferSxdWave(long id_buffer);
CPA_EXPORT SndReal SND_fn_rGetPosBufferSxdWave(long id_buffer);
CPA_EXPORT long SND_fn_lCreateNewBufferExSxdWave(SND_tdstFormat* pformat,SND_tdstCallback* pCallback,SoundParam* par,long user_id);
CPA_EXPORT long SND_fn_lGetPosBufferExSxdWave(long id_buffer);
CPA_EXPORT long SND_fn_lPushBufferExSxdWave(long id_buffer,SND_tdstStackBuffer* pStack);
CPA_EXPORT SndBool SND_fn_bLoadResScriptSxdWave(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
CPA_EXPORT SndBool SND_fn_bLoadResBinarySxdWave(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,char *pDataBloc);
CPA_EXPORT void SND_fn_vConvertResDiskToMemSxdWave(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,void* ptrBegin);
CPA_EXPORT void SND_fn_vUnLoadResSxdWave(tdstBlockResourceMem* mem);
CPA_EXPORT SndBool SND_fn_bIsResLoadedSxdWave(tdstBlockResourceMem *mem);
/*---themes*/
CPA_EXPORT int SND_fn_iInitTransitionSxdWave(SND_tdstInitStruct *pInitStruct);
CPA_EXPORT long SND_fn_lPlayTransitionSxdWave(tduRefRes FirstRes,tduRefRes NextRes,SND_td_pfn_vSoundCallback transition_callback,long param_callback,SoundParam* par);
CPA_EXPORT SndBool SND_fn_bSetParamTransitionSxdWave(long voice,SoundParam *par);
CPA_EXPORT SndBool SND_fn_bSetNextTransitionSxdWave(long voice,tduRefRes new_res);
CPA_EXPORT SndBool SND_fn_bDoTransitionWithFadeSxdWave(long voice,tduRefRes new_res);
CPA_EXPORT SndBool SND_fn_bDoTransitionWithFadeSxdWave2(long voice,tduRefRes new_res,SndReal rFadeDuration);
CPA_EXPORT void SND_fn_vStopTransitionSxdWave(long voice);
CPA_EXPORT void SND_fn_vPauseTransitionSxdWave(long voice);
CPA_EXPORT void SND_fn_vResumeTransitionSxdWave(long voice);
CPA_EXPORT void SND_fn_vGetTargetLabelSxdWave(char* name,int nb_char);
CPA_EXPORT void SND_fn_vSetupTargetSxdWave();
CPA_EXPORT SndBool SND_fn_bCanSetupTargetSxdWave();
/*--relache-reprise a chaud des drives*/
CPA_EXPORT void SND_fn_vReleaseDriverSxdWave(void);
CPA_EXPORT void SND_fn_vRestoreDriverSxdWave(void);
CPA_EXPORT void SND_fn_vForceReleaseDriverSxdWave(void);
CPA_EXPORT void SND_fn_vForceRestoreDriverSxdWave(void);
CPA_EXPORT void SND_fn_vSynchroSxdWave();
CPA_EXPORT void SND_fn_vSetDefaultRollOffSxdWave(RollOffParam* rolloff);
CPA_EXPORT SndBool SND_fn_bCheckVersionResourceSxdWave(tdstBlockResourceDisk* disk);
CPA_EXPORT SndBool SND_fn_b3DOneShootShouldBeConvertedSxdWave();
CPA_EXPORT long SND_fn_lGetNbVoiceOptimumSxdWave();
CPA_EXPORT long SND_fn_lGetNbVoiceWishedSxdWave();
CPA_EXPORT void SND_fn_vSetNbVoiceWishedSxdWave(long nb);
CPA_EXPORT SndBool SND_fn_bSetResourceStaticVolumeSxdWave(tdstBlockResourceMem* pstRes,unsigned char ucVolume);
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SNDXDWAV_H_*/

View File

@@ -0,0 +1,102 @@
/*************************************************************
Module name: AdvWin32.H
Notices: Copyright (c) 1995 Jeffrey Richter
*************************************************************/
/* Disable ridiculous warnings so that the code */
/* compiles cleanly using warning level 4. */
/* nonstandard extension 'single line comment' was used */
#pragma warning(disable: 4001)
// nonstandard extension used : nameless struct/union
#pragma warning(disable: 4201)
// nonstandard extension used : bit field types other than int
#pragma warning(disable: 4214)
// Note: Creating precompiled header
#pragma warning(disable: 4699)
// unreferenced inline function has been removed
#pragma warning(disable: 4514)
// unreferenced formal parameter
#pragma warning(disable: 4100)
// 'type' differs in indirection to slightly different base
// types from 'other type'
#pragma warning(disable: 4057)
// named type definition in parentheses
#pragma warning(disable: 4115)
// nonstandard extension used : benign typedef redefinition
#pragma warning(disable: 4209)
/////////////////////////////////////////////////////////////
// Force all EXEs/DLLs to use STRICT type checking.
#define STRICT
/////////////////////////////////////////////////////////////
// Force all EXEs/DLLs to be compiled for Unicode.
// Uncomment the line below to compile using Unicode strings
// #define UNICODE
#ifdef UNICODE
#define _UNICODE
#endif
/////////////////////////////////////////////////////////////
// Create an ARRAY_SIZE macro that returns the number of
// elements in an array. This is a handy macro that I use
// frequently throughout the sample applications.
#define ARRAY_SIZE(Array) \
(sizeof(Array) / sizeof((Array)[0]))
/////////////////////////////////////////////////////////////
// Create a BEGINTHREADEX macro that calls the C run-time's
// _beginthreadex function. The C run-time library doesn't
// want to have any reliance on Win32 data types such as
// HANDLE. This means that a Win32 programmer needs to cast
// the return value to a HANDLE. This is terribly inconvenient,
// so I have created this macro to perform the casting.
typedef unsigned (__stdcall *PTHREAD_START) (void *);
#define BEGINTHREADEX(lpsa, cbStack, lpStartAddr, \
lpvThreadParm, fdwCreate, lpIDThread) \
((HANDLE)_beginthreadex( \
(void *) (lpsa), \
(unsigned) (cbStack), \
(PTHREAD_START) (lpStartAddr), \
(void *) (lpvThreadParm), \
(unsigned) (fdwCreate), \
(unsigned *) (lpIDThread)))
/////////////////////////////////////////////////////////////
// Compile all CONTEXT structures to use 32-bit members
// instead of 16-bit members. Currently, the only sample
// application that requires this is TInjLib.16 in order
// for it to work correctly on the DEC Alpha AXP.
#define _PORTABLE_32BIT_CONTEXT
/////////////////////////////////////////////////////////////
// Force all EXEs and DLLs to be built for Windows 4.0.
// Comment out the one line below to create samples
// that run under Windows NT 3.1 or Win32s.
// NOTE: Windows NT 3.5 runs Win32 programs marked as 4.0.
//#pragma comment(lib, "msvcrt " "-subsystem:Windows,4.0")
////////////////////////// End Of File //////////////////////

View File

@@ -0,0 +1,130 @@
// EAX.H -- DirectSound Environmental Audio Extensions
#ifndef EAX_H_INCLUDED
#define EAX_H_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
// EAX (listener) reverb property set {4a4e6fc1-c341-11d1-b73a-444553540000}
DEFINE_GUID(DSPROPSETID_EAX_ReverbProperties,
0x4a4e6fc1,
0xc341,
0x11d1,
0xb7, 0x3a, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
typedef enum
{
DSPROPERTY_EAX_ALL, // all reverb properties
DSPROPERTY_EAX_ENVIRONMENT, // standard environment no.
DSPROPERTY_EAX_VOLUME, // loudness of the reverb
DSPROPERTY_EAX_DECAYTIME, // how long the reverb lasts
DSPROPERTY_EAX_DAMPING // the high frequencies decay faster
} DSPROPERTY_EAX_REVERBPROPERTY;
#define EAX_NUM_STANDARD_PROPERTIES (DSPROPERTY_EAX_DAMPING + 1)
// use this structure for get/set all properties...
typedef struct
{
unsigned long environment; // 0 to EAX_ENVIRONMENT_COUNT-1
float fVolume; // 0 to 1
float fDecayTime_sec; // seconds, 0.1 to 100
float fDamping; // 0 to 1
} EAX_REVERBPROPERTIES;
enum
{
EAX_ENVIRONMENT_GENERIC, // factory default
EAX_ENVIRONMENT_PADDEDCELL,
EAX_ENVIRONMENT_ROOM, // standard environments
EAX_ENVIRONMENT_BATHROOM,
EAX_ENVIRONMENT_LIVINGROOM,
EAX_ENVIRONMENT_STONEROOM,
EAX_ENVIRONMENT_AUDITORIUM,
EAX_ENVIRONMENT_CONCERTHALL,
EAX_ENVIRONMENT_CAVE,
EAX_ENVIRONMENT_ARENA,
EAX_ENVIRONMENT_HANGAR,
EAX_ENVIRONMENT_CARPETEDHALLWAY,
EAX_ENVIRONMENT_HALLWAY,
EAX_ENVIRONMENT_STONECORRIDOR,
EAX_ENVIRONMENT_ALLEY,
EAX_ENVIRONMENT_FOREST,
EAX_ENVIRONMENT_CITY,
EAX_ENVIRONMENT_MOUNTAINS,
EAX_ENVIRONMENT_QUARRY,
EAX_ENVIRONMENT_PLAIN,
EAX_ENVIRONMENT_PARKINGLOT,
EAX_ENVIRONMENT_SEWERPIPE,
EAX_ENVIRONMENT_UNDERWATER,
EAX_ENVIRONMENT_DRUGGED,
EAX_ENVIRONMENT_DIZZY,
EAX_ENVIRONMENT_PSYCHOTIC,
EAX_ENVIRONMENT_COUNT // total number of environments
};
#define EAX_MAX_ENVIRONMENT (EAX_ENVIRONMENT_COUNT - 1)
// presets
#define EAX_PRESET_GENERIC EAX_ENVIRONMENT_GENERIC,0.5F,1.493F,0.5F
#define EAX_PRESET_PADDEDCELL EAX_ENVIRONMENT_PADDEDCELL,0.25F,0.1F,0.0F
#define EAX_PRESET_ROOM EAX_ENVIRONMENT_ROOM,0.417F,0.4F,0.666F
#define EAX_PRESET_BATHROOM EAX_ENVIRONMENT_BATHROOM,0.653F,1.499F,0.166F
#define EAX_PRESET_LIVINGROOM EAX_ENVIRONMENT_LIVINGROOM,0.208F,0.478F,0.0F
#define EAX_PRESET_STONEROOM EAX_ENVIRONMENT_STONEROOM,0.5F,2.309F,0.888F
#define EAX_PRESET_AUDITORIUM EAX_ENVIRONMENT_AUDITORIUM,0.403F,4.279F,0.5F
#define EAX_PRESET_CONCERTHALL EAX_ENVIRONMENT_CONCERTHALL,0.5F,3.961F,0.5F
#define EAX_PRESET_CAVE EAX_ENVIRONMENT_CAVE,0.5F,2.886F,1.304F
#define EAX_PRESET_ARENA EAX_ENVIRONMENT_ARENA,0.361F,7.284F,0.332F
#define EAX_PRESET_HANGAR EAX_ENVIRONMENT_HANGAR,0.5F,10.0F,0.3F
#define EAX_PRESET_CARPETEDHALLWAY EAX_ENVIRONMENT_CARPETEDHALLWAY,0.153F,0.259F,2.0F
#define EAX_PRESET_HALLWAY EAX_ENVIRONMENT_HALLWAY,0.361F,1.493F,0.0F
#define EAX_PRESET_STONECORRIDOR EAX_ENVIRONMENT_STONECORRIDOR,0.444F,2.697F,0.638F
#define EAX_PRESET_ALLEY EAX_ENVIRONMENT_ALLEY,0.25F,1.752F,0.776F
#define EAX_PRESET_FOREST EAX_ENVIRONMENT_FOREST,0.111F,3.145F,0.472F
#define EAX_PRESET_CITY EAX_ENVIRONMENT_CITY,0.111F,2.767F,0.224F
#define EAX_PRESET_MOUNTAINS EAX_ENVIRONMENT_MOUNTAINS,0.194F,7.841F,0.472F
#define EAX_PRESET_QUARRY EAX_ENVIRONMENT_QUARRY,1.0F,1.499F,0.5F
#define EAX_PRESET_PLAIN EAX_ENVIRONMENT_PLAIN,0.097F,2.767F,0.224F
#define EAX_PRESET_PARKINGLOT EAX_ENVIRONMENT_PARKINGLOT,0.208F,1.652F,1.5F
#define EAX_PRESET_SEWERPIPE EAX_ENVIRONMENT_SEWERPIPE,0.652F,2.886F,0.25F
#define EAX_PRESET_UNDERWATER EAX_ENVIRONMENT_UNDERWATER,1.0F,1.499F,0.0F
#define EAX_PRESET_DRUGGED EAX_ENVIRONMENT_DRUGGED,0.875F,8.392F,1.388F
#define EAX_PRESET_DIZZY EAX_ENVIRONMENT_DIZZY,0.139F,17.234F,0.666F
#define EAX_PRESET_PSYCHOTIC EAX_ENVIRONMENT_PSYCHOTIC,0.486F,7.563F,0.806F
// EAX buffer reverb property set {4a4e6fc0-c341-11d1-b73a-444553540000}
DEFINE_GUID(DSPROPSETID_EAXBUFFER_ReverbProperties,
0x4a4e6fc0,
0xc341,
0x11d1,
0xb7, 0x3a, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
typedef enum
{
DSPROPERTY_EAXBUFFER_ALL, // all reverb buffer properties
DSPROPERTY_EAXBUFFER_REVERBMIX // the wet source amount
} DSPROPERTY_EAXBUFFER_REVERBPROPERTY;
// use this structure for get/set all properties...
typedef struct
{
float fMix; // linear factor, 0.0F to 1.0F
} EAXBUFFER_REVERBPROPERTIES;
#define EAX_REVERBMIX_USEDISTANCE -1.0F // out of normal range
// signifies the reverb engine should
// calculate it's own reverb mix value
// based on distance
#ifdef __cplusplus
}
#endif // __cplusplus
#endif

View File

@@ -0,0 +1,20 @@
//d<>finitions des effets sonors
// inclus par un et un seul fichier
#define NO_EFFECT 0
#define GREVERB1 1
#define GREVERB2 2
#define GREVERB3 3
#define GREVERB4 4
#define GFLANGE 5
#define LOCAL 6
//---- VARIABLES
long Sound_Global_Effect;
long Sound_Local_Effect;

View File

@@ -0,0 +1,17 @@
/************************************************************
Module name: PMRstSub.H
Notices: Copyright (c) 1995 Jeffrey Richter
************************************************************/
#if defined(DLLCLIENT)
#pragma message("EXE : on importe SubclassProgManFrame")
__declspec(dllimport) BOOL SubclassProgManFrame (DWORD ThreadIdPMRestore);
__declspec(dllimport) HHOOK g_hHook;
#else
#pragma message("DLL : on exporte SubclassProgManFrame")
__declspec(dllexport) BOOL SubclassProgManFrame (DWORD ThreadIdPMRestore);
__declspec(dllexport) HHOOK g_hHook;
#endif
//////////////////////// End Of File ////////////////////////

View File

@@ -0,0 +1,244 @@
#ifndef _SNDHARD_H_
#define _SNDHARD_H_
#if (defined(__cplusplus)&& !defined(CPA_ForceCplusplus))
extern "C" {
#endif // __cplusplus
#include <windows.h>
#include <mmsystem.h>
/*
//////////////////////////////////////////////////////
// SNDHARD.H - Librairie SOUNDxd version 2.0 //
//////////////////////////////////////////////////////
// D<>finitions des types et constantes utilis<69>es //
// par tous les modules de SOUNDxD mais orient<6E>s //
// pour chaque machine (seuls les noms sont communs//
//////////////////////////////////////////////////////
*/
#ifdef M_SET_ALIGNMENT
#pragma pack(push)
#pragma pack(M_SET_ALIGNMENT)
#endif
#ifdef __cplusplus
#define SND_INLINE inline
#else
#define SND_INLINE
#endif
#define SNDBANK_FORMAT2 //pour utiliser le format 2 des banques binaires (un moteur
//compil<69> en format 2 ne peut plus lire le format 1 - un moteur compil<69> en format 1
//peut lire les 2 formats
//---type communs <20> d<>finitions variables
//-------------------------------------------------------------------------
//**********************************************************
//*** Sound Bank Management structures ********
//**********************************************************
typedef enum _tdeBankState
{
BANK_NOT_LOADED, //bank isn't in memory, and no need to be
BANK_LOADED, //bank is in memory
BANK_LOADING, //bank is being loaded
BANK_WAITING, //bank wait to know if it will remain in memory
BANK_TO_BE_LOADED, //banl must be load
BANK_FOR_ALIGNEMENT=SND_ENUM_ALIGNEMENT
} tdeBankState;
struct _tdstSndBankHeader
{
long lVersion;
};
typedef struct _tdstSndBankPolyRes tdstSndBankPolyRes;
typedef struct _tdstSndBankPolyEvent tdstSndBankPolyEvent;
struct _tdstSndBankPolyRes
{
SNDLST2_M_StaticParentDeclaration(tduBlockResource*)
};
struct _tdstSndBankPolyEvent
{
SNDLST2_M_StaticParentDeclaration(SND_tdstBlockEvent*)
};
#define SND_BNM_VERSIONCHECK_1 0x24
#define SND_BNM_VERSIONCHECK_2 0x2B
#define SND_BNM_GETVERSION(ptdstBankHead) ((long)*((long*)(ptdstBankHead)+1))
struct _tdstSndBankHead
{
tdstSndBankHeader stHeader;
tdstSndBankPolyEvent stEventList;
tdstSndBankPolyRes stResList;
unsigned long ulOffsetMPEG;
unsigned long ulOffsetMidi;
unsigned long ulOffsetSample;
#ifdef SNDBANK_FORMAT2
unsigned long ulOffsetADPCM;
unsigned long ulOffsetStreaming;
#endif
unsigned long ulTotalSize;
};
struct _tdstSndBankDescriptor
{
char czFilename[13];
unsigned long ulDataSize;
tdeBankState eState;
tdstSndBankHead* pData;
};
//--------------------------------------------------- MIDI
//param<61>tres d'une ressource midi (donn<6E>es sur disk)
struct _tdstTypeMidiDisk {
SndBool bStream; //streamer ou en m<>moire
SndBool bVolable; //peut-on changer le volume
SndBool bLoop; //bouclant ou non
unsigned long ulNbLoops; //nombre de r<>p<EFBFBD>tition de cet <20>l<EFBFBD>ment
unsigned long ulStartLoop; //point de rebouclage
unsigned long ulEndLoop; //longueur de la boucle
char czFileName[13];
} ;
//param<61>tres d'une ressource midi en m<>moire
struct _tdstMidiMemory {
// void* pvPtrFirst ;//adresse du 1<> octet
// int iLoop; //point de bouclage
// int iLast; //indice du dernier evt.
MCIDEVICEID uiMidiDeviceId;
unsigned long ulLength;
unsigned long ulNbLoops;
} ;
//param<61>tres d'une ressource midi <20> streamer
struct _tdstMidiStreaming {
char fichier[13] ; //nom du fichier
unsigned long Offset ; //Offest des datas dans le fichier
int iLoop; //indice du point de bouclage
int iLast; //indice du dernier evt
} ;
//union des desciption dedata midi
union _tduDataMidi {
tdstMidiMemory stMem;
tdstMidiStreaming stStream;
} ;
//param<61>tres d'une ressource midi (donn<6E>e en m<>moire)
struct _tdstTypeMidiMem {
SndBool bStream; //streamer ou en m<>moire
SndBool bVolable; //peut-on changer le volume
SndBool bLoop; //bouclant ou non
unsigned long ulNbLoops; //nombre de r<>p<EFBFBD>tition de cet <20>l<EFBFBD>ment
unsigned long ulStartLoop; //point de rebouclage
unsigned long ulEndLoop; //longueur de la boucle
tduDataMidi uData ;
} ;
//--------------------------------------------------- CD-AUDIO
//param<61>tre d'une ressource CD (donn<6E>es en mem ou sur disk)
struct _tdstTypeCD {
short wTrackId; //id de la track CD
SndBool bVolable; //peut-on changer son volume
SndBool bLoop; //doit-elle looper
int iNbLoops; //nombre de tours
unsigned long ulStartLoop; //point de rebouclage
unsigned long ulEndLoop; //longeur de la boucle
unsigned long ulStartingFrame; // La piste commence
unsigned long ulEndingFrame; // La piste termine
} ;
//--------------------------------------------------- SAMPLE
//param<61>tre d'une ressource sample (donn<6E>e sur disk)
struct _tdstTypeSampleDisk {
SndBool bPitchable; //peut-on changer le pitch du sample
SndBool bVolable; //peut-on changer son volume
SndBool bPanable; //peut le paner
SndBool bSpacable; //peut-on lui appliquer un effet space
SndBool bReverbable; //peut-on (ou doit-on) le reverber
SndBool bStream; //streming ou en m<>moire
SndBool bLoop; //loope-t-il
unsigned long ulStartLoop; //point de rebouclage en octets
unsigned long ulLoopLength; //longueur de la boucle en octets
unsigned long ulFreq; //fr<66>quence par d<>faut
unsigned short uwResolution; //nb de bits (8 ou 16)
unsigned short uwNbChannels; //nb de canaux(mono, st<73>reo ...)
tdeTypeZip eZip;
char czFileName[13]; //nom du fichier associ<63>
} ;
//param<61>tre d'une ressource sample en m<>moire
struct _tdstSampleMemory {
void* pvPtrFirst ; //adresse du 1<> octet
unsigned long ulNbEchLoop; //indice de l'ech du point de bouclage
unsigned long ulNbEch; //indice du dernier ech
} ;
//param<61>tre d'une ressource sample <20> streamer
struct _tdstSampleStreaming {
char szFileName[13] ;//nom du fichier
unsigned long ulOffsetFirst; //Offest des datas dans le fichier
unsigned long ulOffsetLoop; //offset du point de bouclage en octets
unsigned long ulOffsetLast; //offset du dernier octets.
} ;
//union de la description du sample
union _tduDataSample{
tdstSampleMemory stMem ;
tdstSampleStreaming stStream ;
} ;
//param<61>tres d'une ressource sample (donn<6E>es en mem)
struct _tdstTypeSampleMem {
SndBool bPitchable; //peut-on changer le pitch du sample
SndBool bVolable; //peut-on changer son volume
SndBool bPanable; //peut le paner
SndBool bSpacable; //peut-on lui appliquer un effet space
SndBool bReverbable; //peut-on (ou doit-on) le reverber
SndBool bStream; //streming ou en m<>moire
SndBool bLoop; //loope-t-il
tduDataSample uData; //description du sample
unsigned long ulInc0 ; //p<>riode en echantillons
unsigned long ulFreq; //frequence
unsigned short uwResolution; //nb de bits (8 ou 16)
unsigned short uwNbChannels; //nb de canaux(mono, st<73>reo ...)
tdeTypeZip eZip;
} ;
//extern tduRefRes SND_RES_FANTOME;
//---callback pour buffers clients
//typedef void (WINAPI *td_pfn_vRefreshBufferClient)(long id_buffer,unsigned long first,unsigned long nb,void* ptr_first_sample);
//id_buffer=id/voie du biffer client concern<72>
//first=id du 1<> sample <20> rafraichir (pas en octets)
//nb=nb de samples <20> calculer
//ptr_first_sample=adresse cible
#ifdef M_SET_ALIGNMENT
#pragma pack(pop)
#endif
#if (defined(__cplusplus)&& !defined(CPA_ForceCplusplus))
}
#endif // __cplusplus
#endif //_SNDHARD_H_

View File

@@ -0,0 +1,60 @@
#ifndef _SNDTEST_H_
#define _SNDTEST_H_
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
/*
//////////////////////////////////////////////////////////////
// SNDTEST.H //
//////////////////////////////////////////////////////////////
// Module de test de configuration PC //
//////////////////////////////////////////////////////////////
*/
#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("-> sndtest : functions pointers defined in SNDDLL.H")
#else
DLL_IMPEXP BOOL SND_CALL SND_fn_bTestSnd_Pentium(void);
DLL_IMPEXP BOOL SND_CALL SND_fn_bTestSnd_MMX(void);
DLL_IMPEXP BOOL SND_CALL SND_fn_bTestSnd_WinMM(WAVEFORMATEX *format);
DLL_IMPEXP BOOL SND_CALL SND_fn_bTestSnd_Win32(void);
DLL_IMPEXP BOOL SND_CALL SND_fn_bTestSnd_WinNT(void);
//to force symbols reference (fuction must be EXPORTable)
#ifndef __WATCOMC__
#pragma comment(linker, "/INCLUDE:_SND_fn_bTestSnd_Pentium@0")
#pragma comment(linker, "/INCLUDE:_SND_fn_bTestSnd_MMX@0")
#pragma comment(linker, "/INCLUDE:_SND_fn_bTestSnd_WinMM@4")
#pragma comment(linker, "/INCLUDE:_SND_fn_bTestSnd_Win32@0")
#pragma comment(linker, "/INCLUDE:_SND_fn_bTestSnd_WinNT@0")
#endif
#endif
#ifdef __cplusplus
}
#endif // __cplusplus
#endif //_SNDTEST_H_

View File

@@ -0,0 +1,33 @@
/*
CDplayerResource.h
Ce fichier contient les Ids de menu du Cd player
*/
#define SUBCLASSED_NORMALCALL 0x56
#define SUBCLASSED_NOCALL 0x57
#define SUBCLASSED_ID_MODIF 0x12c
#define SUBCLASSED_ID_QUITTER 0x12d
#define SUBCLASSED_ID_OUTILS 0x190
#define SUBCLASSED_ID_INFODISQUE 0x191
#define SUBCLASSED_ID_ETAT 0x192
#define SUBCLASSED_ID_DUREEMORCEAUECOULEE 0x193
#define SUBCLASSED_ID_DUREEMORCEAURESTANTE 0x194
#define SUBCLASSED_ID_DUREEDISQUERESTANTE 0x195
#define SUBCLASSED_ID_VOLUME 0x196
#define SUBCLASSED_ID_ORDREALEATOIRE 0x1f5
#define SUBCLASSED_ID_LECTURECONTINUE 0x1f7
#define SUBCLASSED_ID_LECTUREINTRO 0x1f8
#define SUBCLASSED_ID_PREFERENCES 0x1f9
#define SUBCLASSED_ID_AIDE 0x25b
#define SUBCLASSED_ID_APROPOS 0x25a
#define SUBCLASSED_ID_PLAY 0x3e8
#define SUBCLASSED_ID_PAUSE 0x3e9
#define SUBCLASSED_ID_STOP 0x3ea
#define SUBCLASSED_ID_PREVTRACK 0x3eb
#define SUBCLASSED_ID_NEXTTRACK 0x3ee
#define SUBCLASSED_ID_FORWARD 0x3ed
#define SUBCLASSED_ID_BACKWARD 0x3ec
#define SUBCLASSED_ID_EJECT 0x3ef

View File

@@ -0,0 +1,42 @@
// Maxi Sound 64 Specific functionalities
#include <INITGUID.H>
// DSPROPERTY_Dream3D
//
// Property supported by the IPropertySet interface associated with the
// Primary Buffer interface.
//
// {E8C0D100-503E-11d1-99DE-444553540000}
DEFINE_GUID(DSPROPERTY_Dream3D,
0xe8c0d100, 0x503e, 0x11d1, 0x99, 0xde, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
// DSPROPERTY_DreamBuffer
//
// Property supported by the IPropertySet interface associated with the
// IDirectSoundBuffer interface.
//
// {E8C0D101-503E-11d1-99DE-444553540000}
DEFINE_GUID(DSPROPERTY_DreamBuffer,
0xe8c0d101, 0x503e, 0x11d1, 0x99, 0xde, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
typedef enum
{
DSPROPERTY_DREAM3D_NOMIDI, // no data
DSPROPERTY_DREAM3D_REMOVEALLBANKS, // no data
DSPROPERTY_DREAM3D_REMOVEBANK, // pPropertyData=BankName[8]
DSPROPERTY_DREAM3D_ADDBANK, // pPropertyData=Sound Bank Path
DSPROPERTY_DREAM3D_REVERB, //*pPropertyData=(BOOL) TRUE(set )/FALSE(remove )
DSPROPERTY_DREAM3D_CHORUS, //*pPropertyData=(BOOL) TRUE(set )/FALSE(remove )
DSPROPERTY_DREAM3D_ECHO, //*pPropertyData=(BOOL) TRUE(set )/FALSE(remove )
DSPROPERTY_DREAM3D_AUDIOIN, //*pPropertyData=(BOOL) TRUE(set )/FALSE(remove )
DSPROPERTY_DREAM3D_EQUALIZER //*pPropertyData=(BOOL) TRUE(set )/FALSE(remove )
} DSPROPERTY_DREAM3D;
typedef enum
{
DSPROPERTY_DREAMBUFFER_LOOPPOINT // *pPropertyData=(DWORD) LoopPoint
} DSPROPERTY_DREAMBUFFER;

View File

@@ -0,0 +1,115 @@
#ifndef __SNDDBG_H__
#define __SNDDBG_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "snddll.h"
//#define SUPERVISATER
// ++++++++++++++++++++++++++++++++++++
// + Macro de compilation en mode DLL +
// ++++++++++++++++++++++++++++++++++++
#ifdef SUPERVISATER
#undef DLL_IMPEXP
#define DLL_IMPEXP __declspec(dllexport)
#else
#undef DLL_IMPEXP
#define DLL_IMPEXP
#endif
//**************************************
#undef CPA_EXPORT
#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
//**************************************
//versions statiques de dbgSND_fn_pstGetSelectedResource et dbgSND_fn_bDoesSupervisaterSelectResource
CPA_EXPORT tdstBlockResourceMem* SND_fn_pstGetSelectedResource(void);
CPA_EXPORT SndBool SND_fn_bDoesSupervisaterSelectResource(void);
CPA_EXPORT void SND_fn_vRefreshSupervisater(void);
#if defined(_DLL_COMPILATION_MODE) && !defined(SNDDLL_MODULE)
//++++++++++++fonctions d<>finies par SNDDBG.DLL
//fonctions g<>n<EFBFBD>rales
DLL_IMPEXP void SND_CALL SND_fn_vLaunchSupervisater(SND_tdstInitStruct *pInitStruct);
DLL_IMPEXP void SND_CALL SND_fn_vKillSupervisater();
DLL_IMPEXP void SND_CALL dbgSND_fn_vSetProjectTitleForSuperVisater(char* ProjectFilename);
DLL_IMPEXP void SND_CALL SND_fn_vSetSupervisaterActive(void);
DLL_IMPEXP SndBool SND_CALL SND_fn_bIsSupervisaterActive(void);
//suivi des objets
DLL_IMPEXP void SND_CALL dbgSND_fn_vAddEventToObject(long indice,long type,long asso,SND_tduRefEvt evt);
DLL_IMPEXP void SND_CALL dbgSND_fn_vKillEventToObject(long indice,long asso);
DLL_IMPEXP void SND_CALL dbgSND_fn_vSetPosObject(long indice,SoundParam* par);
//suivi des micros
DLL_IMPEXP void SND_CALL dbgSND_fn_vAddMicro(long indice);
DLL_IMPEXP void SND_CALL dbgSND_fn_vKillMicro(long indice);
DLL_IMPEXP void SND_CALL dbgSND_fn_vSetPosMicro(long indice,MicroParam* par);
//historique des events
DLL_IMPEXP void SND_CALL dbgSND_fn_vAddHistoric(SND_tduRefEvt evt,long indice,long obj_type,long asso,tdstBlockResourceMem* res);
//ligne de volume
DLL_IMPEXP void SND_CALL dbgSND_fn_vKillVolumeLine(long line);
DLL_IMPEXP void SND_CALL dbgSND_fn_vAddVolumeLine(long line);
DLL_IMPEXP void SND_CALL dbgSND_fn_vSetVolumeLine(long line,long vol);
//bank
DLL_IMPEXP void SND_CALL dbgSND_fn_vLoadBank(int iId);
DLL_IMPEXP void SND_CALL dbgSND_fn_vUnLoadBank(int iId);
DLL_IMPEXP void SND_CALL dbgSND_fn_vAddVoiceSample(long id,tduRefRes res,SampleParam *par);
DLL_IMPEXP void SND_CALL dbgSND_fn_vSetParVoiceSample(long id,SampleParam *par);
DLL_IMPEXP void SND_CALL dbgSND_fn_vDelVoiceSample(long id);
DLL_IMPEXP void SND_CALL dbgSND_fn_vPauseVoiceSample(long id);
DLL_IMPEXP void SND_CALL dbgSND_fn_vResumeVoiceSample(long id);
DLL_IMPEXP tdstBlockResourceMem* SND_CALL dbgSND_fn_pstGetSelectedResource(void);
DLL_IMPEXP SndBool SND_CALL dbgSND_fn_bDoesSupervisaterSelectResource(void);
DLL_IMPEXP void SND_CALL dbgSND_fn_vSetProcessTimeSample(float ratio);
//sndvirt
DLL_IMPEXP void SND_CALL dbgSND_fn_vRajListesSxdVirtual(void* VV,void* VA,void* VD);//obsolete
DLL_IMPEXP void SND_CALL dbgSND_fn_vRajListesSxdVirtual2(SND_tdhVirtualModule p_virtual_module);
DLL_IMPEXP void SND_CALL dbgSND_fn_vInitListesSxdVirtual(long p_virtual_module,char* descrpition);
DLL_IMPEXP void SND_CALL dbgSND_fn_vRefreshSupervisater(void);
#else
//+++++++++fonctions d<>finies par SNDxyuvw.LIB et utilis<69>es par SNDDBG.DLL
DLL_IMPEXP SndBool SND_CALL dbgSND_fn_bGetAskedTheme(tduRefRes*,SndBool*);
DLL_IMPEXP SndBool SND_CALL dbgSND_fn_bGetThemePosition(tduRefRes*,long* ,long* );
DLL_IMPEXP void SND_CALL dbgSND_fn_vGetInfoForObjectSound(long ,long ,char* ,long );
DLL_IMPEXP long SND_CALL dbgSND_fn_lGetSizeOfSoundParam(SoundParam* );
DLL_IMPEXP void SND_CALL SND_fn_vSetResNameCallback(tdpfnResNameCallback pfnResNameCallback);
DLL_IMPEXP const char* SND_CALL SND_fn_czGetResNameFromEdId(unsigned long ulId);
DLL_IMPEXP SndBool SND_CALL dbgSND_fn_bSetResourceStaticVolume(unsigned long ulEdId,unsigned char ucVolume);
DLL_IMPEXP SndReal SND_CALL dbgSND_fn_rGetDopplerFactor(void);
DLL_IMPEXP void SND_CALL dbgSND_fn_vSendRequestSound(SND_tduRefEvt evt);
//to force symbols reference (fuction must be EXPORTable)
#if !defined(__WATCOMC__) && defined(SUPERVISATER)
#pragma comment(linker, "/INCLUDE:_dbgSND_fn_bGetAskedTheme@8")
#pragma comment(linker, "/INCLUDE:_dbgSND_fn_bGetThemePosition@12")
#pragma comment(linker, "/INCLUDE:_dbgSND_fn_vGetInfoForObjectSound@16")
#pragma comment(linker, "/INCLUDE:_dbgSND_fn_lGetSizeOfSoundParam@4")
#pragma comment(linker, "/INCLUDE:_SND_fn_vSetResNameCallback@4")
#pragma comment(linker, "/INCLUDE:_SND_fn_czGetResNameFromEdId@4")
#pragma comment(linker, "/INCLUDE:_dbgSND_fn_bSetResourceStaticVolume@8")
#pragma comment(linker, "/INCLUDE:_dbgSND_fn_rGetDopplerFactor@0")
#pragma comment(linker, "/INCLUDE:_dbgSND_fn_vSendRequestSound@4")
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif //__SNDDBG_H__

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,22 @@
/*-----------------------------------------------------
sndeax.h
-----------------------------------------------------*/
#ifndef __SNDEAX_H__
#define __SNDEAX_H__
/*-----------------------------------------------------
PROTOTYPES
-----------------------------------------------------*/
BOOL fn_bIsEaxAvailable();
void SND_fn_vInitEaxModule(LPDIRECTSOUND lpDSO);
void SND_fn_vDesInitEaxModule();
void SND_fn_vSetPreset(unsigned long ulNewPreset);
BOOL fn_bGetInterfEAX(LPDIRECTSOUNDBUFFER Buffer2D,LPKSPROPERTYSET *pBufferEAX);
BOOL set_param_eax(LPKSPROPERTYSET pBufferEAX,unsigned char ucReverb,BOOL bReverbable);
#endif

View File

@@ -0,0 +1,47 @@
#ifndef _SNDINI_H_
#define _SNDINI_H_
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
#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
//gestion des options
void SND_fn_vInitOptions(SND_tdstInitStruct *pInitStruct);
void SND_fn_vDesInitOptions(void);
#define INI_FILENAME "CPA\\DLL\\SND_CPA.INI"
#if defined(_DLL_COMPILATION_MODE) && !defined(SNDDLL_MODULE)
#pragma message("-> sndini : functions pointers defined in SNDDLL.H")
#else
DLL_IMPEXP SndBool SND_CALL SND_fn_bGetOptions(char* section,char* key,char* value,int size_value);
DLL_IMPEXP void SND_CALL SND_fn_vSetOptions(char* section,char* key,char* value);
DLL_IMPEXP SndBool SND_CALL SND_fn_bCanSetOptions(void);
#endif
#ifdef __cplusplus
}
#endif // __cplusplus
#endif //SNDINI

View File

@@ -0,0 +1,63 @@
#ifndef _SNDLD_BN_H_
#define _SNDLD_BN_H_
//***************************************************************
//* *
//* SNDLD_S.H Version 1.0 *
//* *
//* Private sound data load&reference functions *
//* Binary version *
//* *
//***************************************************************
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
#ifdef M_SET_ALIGNMENT
#pragma pack(push)
#pragma pack(M_SET_ALIGNMENT)
#endif
#ifndef NO_ACP_LDBIN
typedef struct _tdstSndBankDescriptorElement *p_tdstSndBankDescriptorElement;
SNDLST2_M_DynamicUseListOf(p_tdstSndBankDescriptorElement);
struct _tdstSndBankDescriptorElement
{
int iId; //Id of bank
unsigned long iLevel; //level (for StartLoadBank2
char czFileName[13]; //file name of bank
long lBNMCheckVersion; //BNM version (value of CheckVersion)
//signed long ulDataSize; //size of
tdeBankState eState; //current of bank (loading, to be loaded...)
tdstSndBankHead* pData; //pointer to main data (malloc)
void *pDataPrimary; //pointer to primary data (CPA list for Theme, Seq...)
void *pDataMPEG; //pointer to MPEG data
void *pDataMidi; //pointer to Midi data
void *pDataSample; //pointer to Sampel data
void *pDataADPCM; //pointer to Sampel data
SNDLST2_M_DynamicElementDeclaration(p_tdstSndBankDescriptorElement)
} tdstSndBankDescriptorElement;
typedef struct tdstSndBankDescriptorList_{
SNDLST2_M_DynamicAnchorDeclaration(p_tdstSndBankDescriptorElement) pList;
} tdstSndBankDescriptorList;
extern tdstSndBankDescriptorList SND_g_dBankDescriptionList;
p_tdstSndBankDescriptorElement fn_pstGetBankDescriptor(int _iBankNum);
#endif //NO_ACP_LDBIN
#ifdef M_SET_ALIGNMENT
#pragma pack(pop)
#endif
#ifdef __cplusplus
}
#endif // __cplusplus
#endif //_SNDLD_BN_H_

View File

@@ -0,0 +1,42 @@
#ifndef _SNDLD_HY_H_
#define _SNDLD_HY_H_
//***************************************************************
//* *
//* SNDLD_S.H Version 1.0 *
//* *
//* Private sound data load&reference functions *
//* Binary version *
//* *
//***************************************************************
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
//**************************************
#undef CPA_EXPORT
#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
//**************************************
#ifdef SND_HYBRID_VERSION
CPA_EXPORT SndBool SND_fn_bDesInitDataLoadSnd(void);
CPA_EXPORT const char * SND_fn_czGetProjectTitle(void);
#endif //SND_HYBRID_VERSION
#ifdef __cplusplus
}
#endif // __cplusplus
#endif //_SNDLD_HY_H_

View File

@@ -0,0 +1,41 @@
#ifndef _SNDLD_S_H_
#define _SNDLD_S_H_
//***************************************************************
//* *
//* SNDLD_S.H Version 1.0 *
//* *
//* Private sound data load&reference functions *
//* Script version *
//* *
//***************************************************************
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
/****************************************/
#undef CPA_EXPORT
#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
/****************************************/
extern CPA_EXPORT SCR_tdst_Link_Table* SND_pstGetEventGroupLinkTable(void);
void SND_fn_vInitScriptSnd(void);
void SND_fn_vDesInitScriptSnd(void);
CPA_EXPORT const char * SND_fn_czGetProjectTitle(void);
#ifdef __cplusplus
}
#endif // __cplusplus
#endif //_SNDLD_S_H_

View File

@@ -0,0 +1,58 @@
//=========================
//
// Mixer.h
//
//=========================
#ifndef __MIXER_H__
#define __MIXER_H__
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
#include "mmsystem.h"
//=========================
// DEFINES
//=========================
#define MIXER_ERR_NOERR 0
#define MIXER_ERR_NOMIXER 1
#define MIXER_ERR_GETID 2
#define MIXER_ERR_OPEN 3
#define MIXER_ERR_GETCAPS 4
#define MIXER_ERR_GETLINEINFOCD 5
#define MIXER_ERR_GETLINEINFOSAMPLE 6
#define MIXER_ERR_GETLINECONTROLSCD 7
#define MIXER_ERR_GETLINECONTROLSSAMPLE 8
//=========================
// PROTOTYPES
//=========================
int MixerInit(HWAVEOUT hWave);
UINT GetNbrMixers();
DWORD GetNbrAudioLines();
DWORD GetCDMax();
DWORD GetCDMin();
DWORD SND_fn_dwGetCDValue();
void SND_fn_vSetCDValue(DWORD val);
DWORD GetSampleMax();
DWORD GetSampleMin();
DWORD SND_fn_dwGetSampleValue();
void SND_fn_vSetSampleValue(DWORD val);
DWORD GetMidiMax();
DWORD GetMidiMin();
DWORD GetMidiValue();
void SetMidiValue(DWORD val);
BOOL SND_fn_bIsCDControlAvailable();
BOOL SND_fn_bIsSampleControlAvailable();
int MixerDesInit();
int SND_fn_iMixerDesInitSample(void);
int SND_fn_iMixerInitSample(HWAVEOUT hWave);
#ifdef __cplusplus
}
#endif // __cplusplus
#endif //MIXER_H_

View File

@@ -0,0 +1,21 @@
// module de gestion des ressources samples PCM stream<61>es
// multi plateforme (commun <20> directX, WinMM,...)
long SND_fn_lPlaySxdStream(tduRefRes res,SoundParam *par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback);
void SND_fn_vRemoveCallbackSxdStream(long voice);
SndBool SND_fn_bSetParamSxdStream(long voice,SoundParam *par);
SndBool SND_fn_bTestIsPlayingSxdStream(long voice);
void SND_fn_vStopSxdStream(long voice);
void SND_fn_vPauseSxdStream(long voice);
void SND_fn_vResumeSxdStream(long voice);
int SND_fn_iInitSxdStream(SND_tdstInitStruct *pInitStruct);
SndBool SND_fn_bTestInitSxdStream(void);
void SND_fn_vDesInitSxdStream(void);
SndReal SND_fn_rGetPosSxdStream(long voice);
SndReal SND_fn_rGetLengthSxdStream(long voice);
SndBool SND_fn_bLoadResScriptSxdStream(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
SndBool SND_fn_bLoadResBinarySxdStream(tdstBlockResourceDisk *_pBRDisk,tdstBlockResourceMem *_pBRMem,char *pDataBloc);
void SND_fn_vUnLoadResSxdStream(tdstBlockResourceMem* mem);
SndBool SND_fn_bSetResourceStaticVolumeSxdStream(tdstBlockResourceMem* pstRes,unsigned char ucVolume);

View File

@@ -0,0 +1,25 @@
#ifndef _MOTORSND_H_
#define _MOTORSND_H_
// this file must include no one else
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
#undef DLL_IMPORT
#undef DLL_EXPORT
//#if (!defined(_DLL_MODULE))
extern HWND hwndMainSnd;
extern HINSTANCE SND_g_hResourceHandle;
extern HINSTANCE SND_hGlobalInst;
//#endif
#ifdef __cplusplus
}
#endif // __cplusplus
#endif //_MOTORSND_H_

View File

@@ -0,0 +1,222 @@
#ifndef _SNDHARD_H_
#define _SNDHARD_H_
#if (defined(__cplusplus)&& !defined(CPA_ForceCplusplus))
extern "C" {
#endif // __cplusplus
/*
//////////////////////////////////////////////////////
// SNDHARD.H - Librairie SOUNDxd version 2.0 //
//////////////////////////////////////////////////////
// D<>finitions des types et constantes utilis<69>es //
// par tous les modules de SOUNDxD mais orient<6E>s //
// pour chaque machine (seuls les noms sont communs//
//////////////////////////////////////////////////////
*/
#define SNDBANK_FORMAT2 //pour utiliser le format 2 des banques binaires (un moteur
//compil<69> en format 2 ne peut plus lire le format 1 - un moteur compil<69> en format 1
//peut lire les 2 formats
//---type communs <20> d<>finitions variables
//-------------------------------------------------------------------------
//**********************************************************
//*** Sound Bank Management structures ********
//**********************************************************
typedef enum _tdeBankState
{
BANK_NOT_LOADED, //bank isn't in memory, and no need to be
BANK_LOADED, //bank is in memory
BANK_LOADING, //bank is being loaded
BANK_WAITING, //bank wait to know if it will remain in memory
BANK_TO_BE_LOADED, //banl must be load
BANK_FOR_ALIGNEMENT=SND_ENUM_ALIGNEMENT
} tdeBankState;
struct _tdstSndBankHeader
{
long lVersion;
};
typedef struct _tdstSndBankPolyRes tdstSndBankPolyRes;
typedef struct _tdstSndBankPolyEvent tdstSndBankPolyEvent;
struct _tdstSndBankPolyRes
{
SNDLST2_M_StaticParentDeclaration(tduBlockResource*)
};
struct _tdstSndBankPolyEvent
{
SNDLST2_M_StaticParentDeclaration(SND_tdstBlockEvent*)
};
#define SND_BNM_VERSIONCHECK_1 0x24
#define SND_BNM_VERSIONCHECK_2 0x28
#define SND_BNM_GETVERSION(ptdstBankHead) ((long)*((long*)(ptdstBankHead)+1))
struct _tdstSndBankHead
{
tdstSndBankHeader stHeader;
tdstSndBankPolyEvent stEventList;
tdstSndBankPolyRes stResList;
unsigned long ulOffsetMPEG;
unsigned long ulOffsetMidi;
unsigned long ulOffsetSample;
#ifdef SNDBANK_FORMAT2
unsigned long ulOffsetADPCM;
#endif
unsigned long ulTotalSize;
};
struct _tdstSndBankDescriptor
{
char czFilename[13];
unsigned long ulDataSize;
tdeBankState eState;
tdstSndBankHead* pData;
};
//--------------------------------------------------- MIDI
//param<61>tres d'une ressource midi (donn<6E>es sur disk)
struct _tdstTypeMidiDisk {
SndBool bStream; //streamer ou en m<>moire
SndBool bVolable; //peut-on changer le volume
SndBool bLoop; //bouclant ou non
unsigned long ulNbLoops; //nombre de r<>p<EFBFBD>tition de cet <20>l<EFBFBD>ment
unsigned long ulStartLoop; //point de rebouclage
unsigned long ulEndLoop; //longueur de la boucle
char czFileName[13];
} ;
//param<61>tres d'une ressource midi en m<>moire
struct _tdstMidiMemory {
// void* pvPtrFirst ;//adresse du 1<> octet
// int iLoop; //point de bouclage
// int iLast; //indice du dernier evt.
//MCIDEVICEID uiMidiDeviceId;
unsigned long ulLength;
unsigned long ulNbLoops;
} ;
//param<61>tres d'une ressource midi <20> streamer
struct _tdstMidiStreaming {
char fichier[13] ; //nom du fichier
unsigned long Offset ; //Offest des datas dans le fichier
int iLoop; //indice du point de bouclage
int iLast; //indice du dernier evt
} ;
//union des desciption dedata midi
union _tduDataMidi {
tdstMidiMemory stMem;
tdstMidiStreaming stStream;
} ;
//param<61>tres d'une ressource midi (donn<6E>e en m<>moire)
struct _tdstTypeMidiMem {
SndBool bStream; //streamer ou en m<>moire
SndBool bVolable; //peut-on changer le volume
SndBool bLoop; //bouclant ou non
unsigned long ulNbLoops; //nombre de r<>p<EFBFBD>tition de cet <20>l<EFBFBD>ment
unsigned long ulStartLoop; //point de rebouclage
unsigned long ulEndLoop; //longueur de la boucle
tduDataMidi uData ;
} ;
//--------------------------------------------------- CD-AUDIO
//param<61>tre d'une ressource CD (donn<6E>es en mem ou sur disk)
struct _tdstTypeCD {
short wTrackId; //id de la track CD
SndBool bVolable; //peut-on changer son volume
SndBool bLoop; //doit-elle looper
unsigned long ulNbLoops; //nombre de tours
unsigned long ulStartLoop; //point de rebouclage
unsigned long ulEndLoop; //longeur de la boucle
unsigned long ulStartingFrame; // La piste commence
unsigned long ulEndingFrame; // La piste termine
} ;
//--------------------------------------------------- SAMPLE
//param<61>tre d'une ressource sample (donn<6E>e sur disk)
struct _tdstTypeSampleDisk {
SndBool bPitchable; //peut-on changer le pitch du sample
SndBool bVolable; //peut-on changer son volume
SndBool bPanable; //peut le paner
SndBool bSpacable; //peut-on lui appliquer un effet space
SndBool bReverbable; //peut-on (ou doit-on) le reverber
SndBool bStream; //streming ou en m<>moire
SndBool bLoop; //loope-t-il
unsigned long ulStartLoop; //point de rebouclage en octets
unsigned long ulLoopLength; //longueur de la boucle en octets
unsigned long ulFreq; //fr<66>quence par d<>faut
unsigned short uwResolution; //nb de bits (8 ou 16)
unsigned short uwNbChannels; //nb de canaux(mono, st<73>reo ...)
tdeTypeZip eZip;
char czFileName[13]; //nom du fichier associ<63>
} ;
//param<61>tre d'une ressource sample en m<>moire
struct _tdstSampleMemory {
void* pvPtrFirst ; //adresse du 1<> octet
unsigned long ulNbEchLoop; //indice de l'ech du point de bouclage
unsigned long ulNbEch; //indice du dernier ech
} ;
//param<61>tre d'une ressource sample <20> streamer
struct _tdstSampleStreaming {
char szFileName[13] ;//nom du fichier
unsigned long ulOffsetFirst; //Offest des datas dans le fichier
unsigned long ulOffsetLoop; //offset du point de bouclage en octets
unsigned long ulOffsetLast; //offset du dernier octets.
} ;
//union de la description du sample
union _tduDataSample{
tdstSampleMemory stMem ;
tdstSampleStreaming stStream ;
} ;
//param<61>tres d'une ressource sample (donn<6E>es en mem)
struct _tdstTypeSampleMem {
SndBool bPitchable; //peut-on changer le pitch du sample
SndBool bVolable; //peut-on changer son volume
SndBool bPanable; //peut le paner
SndBool bSpacable; //peut-on lui appliquer un effet space
SndBool bReverbable; //peut-on (ou doit-on) le reverber
SndBool bStream; //streming ou en m<>moire
SndBool bLoop; //loope-t-il
tduDataSample uData; //description du sample
unsigned long ulInc0 ; //p<>riode en echantillons
unsigned long ulFreq; //frequence
unsigned short uwResolution; //nb de bits (8 ou 16)
unsigned short uwNbChannels; //nb de canaux(mono, st<73>reo ...)
tdeTypeZip eZip;
} ;
//extern tduRefRes SND_RES_FANTOME;
//---callback pour buffers clients
//typedef void (WINAPI *td_pfn_vRefreshBufferClient)(long id_buffer,unsigned long first,unsigned long nb,void* ptr_first_sample);
//id_buffer=id/voie du biffer client concern<72>
//first=id du 1<> sample <20> rafraichir (pas en octets)
//nb=nb de samples <20> calculer
//ptr_first_sample=adresse cible
#if (defined(__cplusplus)&& !defined(CPA_ForceCplusplus))
}
#endif // __cplusplus
#endif //_SNDHARD_H_

View File

@@ -0,0 +1,59 @@
#ifndef _SNDLD_BN_H_
#define _SNDLD_BN_H_
//***************************************************************
//* *
//* SNDLD_S.H Version 1.0 *
//* *
//* Private sound data load&reference functions *
//* Binary version *
//* *
//***************************************************************
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
#ifdef M_SET_ALIGNMENT
#pragma pack(push)
#pragma pack(M_SET_ALIGNMENT)
#endif
#ifndef NO_ACP_LDBIN
typedef struct _tdstSndBankDescriptorElement *p_tdstSndBankDescriptorElement;
SNDLST2_M_DynamicUseListOf(p_tdstSndBankDescriptorElement);
struct _tdstSndBankDescriptorElement
{
int iId; //Id of bank
unsigned long iLevel; //level (for StartLoadBank2
char czFileName[13]; //file name of bank
long lBNMCheckVersion; //BNM version (value of CheckVersion)
//signed long ulDataSize; //size of
tdeBankState eState; //current of bank (loading, to be loaded...)
tdstSndBankHead* pData; //pointer to main data (malloc)
void *pDataPrimary; //pointer to primary data (CPA list for Theme, Seq...)
void *pDataMPEG; //pointer to MPEG data
void *pDataMidi; //pointer to Midi data
void *pDataSample; //pointer to Sampel data
void *pDataADPCM; //pointer to Sampel data
SNDLST2_M_DynamicElementDeclaration(p_tdstSndBankDescriptorElement)
} tdstSndBankDescriptorElement;
extern tdstSndBankDescriptorList SND_g_dBankDescriptionList;
p_tdstSndBankDescriptorElement fn_pstGetBankDescriptor(int _iBankNum);
#endif //NO_ACP_LDBIN
#ifdef M_SET_ALIGNMENT
#pragma pack(pop)
#endif
#ifdef __cplusplus
}
#endif // __cplusplus
#endif //_SNDLD_BN_H_

View File

@@ -0,0 +1,160 @@
#define SUPERVISATER
#ifdef __cplusplus
extern "C" {
#endif
#include "sndlst2.h"
#undef DLL_IMPEXP
#ifdef _DLL_COMPILATION_MODE
#define DLL_IMPEXP __declspec(dllexport)
#else
#define DLL_IMPEXP
#endif
typedef struct dbgMICRO_DESCRIPTION_ *pdbgMICRO_DESCRIPTION;
SNDLST2_M_DynamicUseListOf(pdbgMICRO_DESCRIPTION);
typedef struct dbgMICRO_DESCRIPTION_{
long Id;
long sndId;
MicroParam par;
SNDLST2_M_DynamicElementDeclaration(pdbgMICRO_DESCRIPTION)
}dbgMICRO_DESCRIPTION;
typedef struct dbgLISTE_MICRO_{
SNDLST2_M_DynamicAnchorDeclaration(pdbgMICRO_DESCRIPTION) pList;
}dbgLISTE_MICRO;
//-------stockage des associations
typedef struct dbgSND_tdstEvtStruct_ *pdbgSND_tdstEvtStruct;
SNDLST2_M_DynamicUseListOf(pdbgSND_tdstEvtStruct);
typedef struct dbgSND_tdstEvtStruct_
{
SND_tduRefEvt evt;
long asso;
SNDLST2_M_DynamicElementDeclaration(pdbgSND_tdstEvtStruct)
} dbgSND_tdstEvtStruct;
/* */
typedef struct dbgLISTE_EVT_{
SNDLST2_M_DynamicAnchorDeclaration(pdbgSND_tdstEvtStruct) pList;
} dbgLISTE_EVT;
typedef struct dbgSND_tdstObjectStruct_ *pdbgSND_tdstObjectStruct;
SNDLST2_M_DynamicUseListOf(pdbgSND_tdstObjectStruct);
/* */
typedef struct dbgSND_tdstObjectStruct_
{
//long asso; //id de l'asso SOUND3D
long indice; //id de l'objet
SoundParam par;
dbgLISTE_EVT evts;
SNDLST2_M_DynamicElementDeclaration(pdbgSND_tdstObjectStruct)
} dbgSND_tdstObjectStruct;
typedef struct dbgLISTE_OBJECT_{
SNDLST2_M_DynamicAnchorDeclaration(pdbgSND_tdstObjectStruct) pList;
} dbgLISTE_OBJECT;
/***************** pour diversSND *****************************************/
//resource view-list
typedef struct dbgVOLUMELINE_DESCRIPTION_ *pdbgVOLUMELINE_DESCRIPTION;
SNDLST2_M_DynamicUseListOf(pdbgVOLUMELINE_DESCRIPTION);
typedef struct dbgVOLUMELINE_DESCRIPTION_{
long id;
long vol;
SNDLST2_M_DynamicElementDeclaration(pdbgVOLUMELINE_DESCRIPTION)
}dbgVOLUMELINE_DESCRIPTION;
typedef struct dbgLISTE_VOLUMELINE_{
SNDLST2_M_DynamicAnchorDeclaration(pdbgVOLUMELINE_DESCRIPTION) pList;
}dbgVOLUMELINE_MICRO;
/***************** pour VISUSND *****************************************/
typedef struct dbgVISUSND_ELEMENT_ *pdbgVISUSND_ELEMENT;
SNDLST2_M_DynamicUseListOf(pdbgVISUSND_ELEMENT);
typedef struct dbgVISUSND_ELEMENT_{
long id;
tduRefRes res;
SoundParam par;
SNDLST2_M_DynamicElementDeclaration(pdbgVISUSND_ELEMENT)
}dbgVISUSND_ELEMENT;
typedef struct dbgVISUSND_LISTE_{
SNDLST2_M_DynamicAnchorDeclaration(pdbgVISUSND_ELEMENT) pList;
}dbgVISUSND_LISTE;
#define TAILLE_HISTORIC 256
typedef struct {
// u64 time;
SND_tduRefEvt evt;
long obj;
long asso;
} historic_element;
//variables
extern dbgLISTE_MICRO dbg_micros;//liste des micros (utiliser pas SynchroSonore)
extern dbgLISTE_OBJECT dbg_objects; //description des associations courantes
extern dbgVISUSND_LISTE dbg_visusnd;
extern dbgVOLUMELINE_MICRO dbgVolumeLineSnd;
extern SndBool dbg_micros_init;
extern SndBool dbg_objects_init;
extern historic_element historic[TAILLE_HISTORIC];
extern int next_histo_element;
//fonctions g<>n<EFBFBD>rales
void SND_CALL SND_fn_vSetSupervisaterActive(SndBool active);
void SND_CALL SND_fn_vLaunchSupervisater(SND_tdstInitStruct *pInitStruct);
void SND_CALL SND_fn_vKillSupervisater();
//suivi des objets
void SND_CALL dbgSND_fn_vAddEventToObject(long indice,long type,long asso,SND_tduRefEvt evt);
void SND_CALL SND_CALL dbgSND_fn_vKillEventToObject(long indice,long asso);
void SND_CALL dbgSND_fn_vSetPosObject(long indice,SoundParam* par);
//suivi des micros
void SND_CALL dbgSND_fn_vAddMicro(long indice);
void SND_CALL dbgSND_fn_vKillMicro(long indice);
void SND_CALL dbgSND_fn_vSetPosMicro(long indice,MicroParam* par);
//historique des events
void SND_CALL dbgSND_fn_vAddHistoric(SND_tduRefEvt evt,long indice,long type_obj,long asso,tdstBlockResourceMem* res);
//ligne de volume
void SND_CALL dbgSND_fn_vKillVolumeLine(long line);
void SND_CALL dbgSND_fn_vAddVolumeLine(long line);
void SND_CALL dbgSND_fn_vSetVolumeLine(long line,long vol);
//bank
void SND_CALL dbgSND_LoadBank(int iId);
void SND_CALL dbgSND_UnLoadBank(int iId);
//sndvirt
//DLL_IMPEXP void SND_CALL dbgSND_fn_vRajListesSxdVirtual(virtual_voice_list* VV,audible_voice_list* VA,dead_voice_list* VD);
DLL_IMPEXP void SND_CALL dbgSND_fn_vRajListesSxdVirtual2(SND_tdhVirtualModule p_virtual_module);
DLL_IMPEXP void SND_CALL dbgSND_fn_vInitListesSxdVirtual(long p_virtual_module,char* descrpition);
//snd
DLL_IMPEXP void SND_CALL dbgSND_fn_vAddVoiceSample(long id,tduRefRes res,SampleParam *par);
DLL_IMPEXP void SND_CALL dbgSND_fn_vSetParVoiceSample(long id,SampleParam *par);
DLL_IMPEXP void SND_CALL dbgSND_fn_vDelVoiceSample(long id);
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,7 @@
//gestion des options
#include "snd.h"
void SND_fn_vInitOptions(SND_tdstInitStruct *pInitStruct);
void SND_fn_vDesInitOptions(void);

View File

@@ -0,0 +1,20 @@
// module de gestion des ressources samples PCM stream<61>es
// multi plateforme (commun <20> directX, WinMM,...)
long SND_fn_lPlaySxdStream(tduRefRes res,SoundParam *par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback);
void SND_fn_vRemoveCallbackSxdStream(long voice);
SndBool SND_fn_bSetParamSxdStream(long voice,SoundParam *par);
SndBool SND_fn_bTestIsPlayingSxdStream(long voice);
void SND_fn_vStopSxdStream(long voice);
void SND_fn_vPauseSxdStream(long voice);
void SND_fn_vResumeSxdStream(long voice);
int SND_fn_iInitSxdStream(SND_tdstInitStruct *pInitStruct);
SndBool SND_fn_bTestInitSxdStream(void);
void SND_fn_vDesInitSxdStream(void);
SndReal SND_fn_rGetPosSxdStream(long voice);
SndReal SND_fn_rGetLengthSxdStream(long voice);
SndBool SND_fn_bLoadResScriptSxdStream(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
SndBool SND_fn_bLoadResBinarySxdStream(tdstBlockResourceDisk *_pBRDisk,tdstBlockResourceMem *_pBRMem,char *pDataBloc);
void SND_fn_vUnLoadResSxdStream(tdstBlockResourceMem* mem);

View File

@@ -0,0 +1,68 @@
#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_*/

View File

@@ -0,0 +1,39 @@
#ifndef _SND_BINARY_CONVERT_H_
#define _SND_BINARY_CONVERT_H_
/*
/////////////////////////////////////////////////////////////////
// SNDBINCT.H Version 1.0 //
/////////////////////////////////////////////////////////////////
// Module d'interfacage entre chargement binaire et script //
/////////////////////////////////////////////////////////////////
*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/**************************************/
#undef CPA_EXPORT
#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
/**************************************/
void SND_fn_vInitBinaryConversionInterface(const char *szFileTitle);
void SND_fn_vDesInitBinaryConversionInterface(void);
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SND_BINARY_CONVERT_H_*/

View File

@@ -0,0 +1,151 @@
#ifndef _SNDEVENT_H_
#define _SNDEVENT_H_
/*-------------------------------------------------------------------------*/
/*definitions specifiques <20> la target*/
#ifdef SND_SCRIPT_VERSION /*Mode Script pur*/
#if defined(SNDLST2_StaticIsOptimised) || defined(LST2_StaticIsOptimised)
#error Macros not coherent
#endif
#endif
#ifdef SND_HYBRID_VERSION /*Mode Hybride*/
#define LST2_StaticIsOptimised
#define SNDLST2_StaticIsOptimised
#endif
#ifdef SND_BINARY_VERSION /*Mode Binaire pur*/
#define LST2_StaticIsOptimised
#define SNDLST2_StaticIsOptimised
#endif
#if ((!defined(SND_SCRIPT_VERSION))&&((!defined(SND_HYBRID_VERSION))&&(!defined(SND_BINARY_VERSION))))
#error neither SCRIPT,HYBRID, or BINARY defined
#endif
#include "sndlst2.h"
#include "sndhard.h"
#ifdef M_SET_ALIGNMENT
#pragma pack(push)
#pragma pack(M_SET_ALIGNMENT)
#endif
typedef enum {
EVT_INVALID,
EVT_SON_PLAY ,
EVT_SON_STOP ,
EVT_SON_STOP_ALL ,
EVT_SON_STOP_N_GO,
EVT_SON_STOP_N_GO_CROSSFADE ,
EVT_SON_PITCH ,
EVT_SON_VOLUME ,
EVT_SON_PAN ,
EVT_SON_EFFET,
EVT_SON_EXTRA,
EVT_SON_CHANGE_VOLUME,
FOR_ALIGNEMENT=SND_ENUM_ALIGNEMENT
} tdeTypeEvent ;
#define NB_TYPES_EVT 12
/*parametre de DeTuning*/
typedef struct {
SndReal rDelta;
} tdstDeTune;
/*valeur pour laquelle il n'y a pas de tuning*/
#define NO_DETUNING C_SNDREAL_0
/*parametres de l'evt de type<70>Play*/
typedef struct {
tduRefRes uResource; /*ressource associee*/
tdstDeTune stDeTune;
} tdstEvtPlay;
/*parametres de l'evt de type Stop*/
typedef struct {
SND_tduRefEvt uEvt; /*evt <20> stopper*/
} tdstEvtStop;
/*parametres de l'evt de type Stop'N'Go*/
typedef struct {
SND_tduRefEvt uEvtStop; /*evt <20> stopper*/
SND_tduRefEvt uEvtGo; /*evt <20> lancer*/
} tdstEvtStopNGo;
/*parametres de l'evt de type Stop'N'Go avec Crossfade*/
typedef struct {
SND_tduRefEvt uEvtStop; /*evt <20> stopper*/
SND_tduRefEvt uEvtGo; /*evt <20> lancer*/
int iTime; /*duree du fade*/
} tdstEvtStopNGoFade;
/*parametres de l'evt de type ExtraParam(pitch,vol ou pan)*/
typedef struct {
tduRefRes uResource; /*ressource associee*/
SndReal CoefA; /*coef a dans s=a*e+b*/
SndReal CoefB; /*coef b dans s=a*e+b*/
tdstDeTune stDeTune;
} tdstEvtExtraParam;
/*parametres de l'evt de type ExtraALL(pitch,vol et pan)*/
typedef struct {
tduRefRes uResource; /*ressource associee*/
SndRealTwin rtCoefPitch; /*coef a et b pour Pitch*/
SndRealTwin rtCoefVol; /*coef a et b pour Volume*/
SndRealTwin rtCoefPan; /*coef a et b pour Pan*/
} tdstEvtExtraAll;
/*parametres de l'evt de type effet*/
typedef struct {
int iIdEffect; /*id de l'effet*/
} tdstEvtEffect;
/*parameters for event "Change Volume"*/
typedef struct {
SndBool bConcernWithObjectType;/*if TRUE, all object from the same type are concerned;if FALSE, only one object is concerned*/
long lNewVolume;
} tdstEvtchangeVolume;
/*union des parametres des differents types d'evt*/
typedef union {
tdstEvtPlay stPlay;
tdstEvtStop stStop;
tdstEvtStopNGo stStopNGo;
tdstEvtStopNGoFade stStopNGoFade;
tdstEvtExtraParam stExtraParam;
tdstEvtExtraAll stExtraAll;
tdstEvtEffect stEffect;
tdstEvtchangeVolume stChangeVolume;
} tduEvtParams;
/*description d'un evt*/
struct _SND_tdstBlockEvent {
tdxId Id; /*id de l'evt*/
tdeTypeEvent eType; /*type*/
tduEvtParams uParams; /*parametres propres au type de l'evt*/
SndBool_field_decl(bStopable); /*TRUE si evt stopable <20> la mort de l'objet*/
SndBool_field_decl(bDynamic); /*TRUE si Synchrosonore modifie les param de l'objet en temps reel*/
/*M_LstChildDeclaration(SND_tdstBlockEvent,tdstSndPolyEvent); //inclusion dans la liste ACP*/
SNDLST2_M_StaticChildDeclaration(SND_tdstBlockEvent*,tdstSndPolyEvent*) /*inclusion dans la liste ACP*/
};
/*liste des evts*/
struct _tdstSndPolyEvent {
/* M_LstParentDeclaration(SND_tdstBlockEvent);*/
SNDLST2_M_StaticParentDeclaration(SND_tdstBlockEvent*)
};
#ifdef M_SET_ALIGNMENT
#pragma pack(pop)
#endif
#endif /*_SNDEVENT_H_*/

View File

@@ -0,0 +1,93 @@
#ifndef _SND_LOAD_SCRIPT_H_
#define _SND_LOAD_SCRIPT_H_
/*
/////////////////////////////////////////////////////////////////
// SNDLDSCR.H Version 2.0 //
/////////////////////////////////////////////////////////////////
// Module de chargement des structures moteur son par script //
/////////////////////////////////////////////////////////////////
*/
/* INCLUSION TEMPORAIRE DE SIF :*/
/*#include "SIF.h"*/
#include "SCR.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/****************************************/
#undef CPA_EXPORT
#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
/****************************************/
char *SND_fn_pszGetResourceSectionNameFromPointer(tdstBlockResourceMem *_pResMem);
extern SCR_tdst_Link_Table SND_gs_ResTable;
extern CPA_EXPORT SCR_tdst_Link_Table* SND_pstGetEventGroupLinkTable(void);
extern CPA_EXPORT SCR_tdst_Link_Table* SND_pstGetEventPreEditorLoadTable(void);
extern CPA_EXPORT void SND_fn_vConvertBRDiskToString(tdstBlockResourceDisk *_pDisk,char *_szString);
extern CPA_EXPORT void SND_fn_vConvertStringToBRDisk(char *_szString,tdstBlockResourceDisk *_pDisk);
extern unsigned long SND_fn_ulGetEventGroupId(const char *_szFileName);
void SND_fn_vInitScriptSnd(void);
void SND_fn_vDesInitScriptSnd(void);
CPA_EXPORT const char * SND_fn_czGetProjectTitle(void);
/* res type functions:*/
typedef struct _tdstResTypeList tdstResTypeList;
typedef struct _tdstResTypeFunctions tdstResTypeFunctions;
struct _tdstResTypeList
{
SNDLST2_M_DynamicParentDeclaration( tdstResTypeFunctions *)
};
typedef void (*td_pfn_vResScriptEntryAnalysis)(char *szAction, char *szParams[],tdstBlockResourceDisk *pResDisk);
typedef void (*td_pfn_vBRMemInit)(tdstBlockResourceMem *pResMem);
typedef void (*td_pfn_vBRDiskInit)(tdstBlockResourceDisk *pResDisk);
struct _tdstResTypeFunctions
{
int m_iResTypeId;
td_pfn_vResScriptEntryAnalysis m_pAnalyseEntry;
td_pfn_vBRMemInit m_pBRMemInit;
td_pfn_vBRDiskInit m_pBRDiskInit;
SNDLST2_M_DynamicChildDeclaration(tdstResTypeFunctions*,tdstResTypeList*)
};
void SND_fn_vInitResTypeList(void);
void SND_fn_vDesInitResTypeList(void);
void SND_fn_vAddResType(tdstResTypeFunctions *_pResFunctions);
void SND_fn_vAnalyseScriptEntryForResType(int _iResTypeId,char *szAction, char *szParams[],tdstBlockResourceDisk *pResDisk);
void SND_fn_vInitBRMemForResType(int _iResTypeId,tdstBlockResourceMem *pResMem);
void SND_fn_vInitBRDiskForResType(int _iResTypeId,tdstBlockResourceDisk *pResDisk);
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SND_LOAD_SCRIPT_H_*/

View File

@@ -0,0 +1,488 @@
/* (c) Ubi Sound Studios 1998*/
/* Lists for SND library (Static lists for engine/editor: dynamic lists)*/
/* copied from LST2.H the 15th of April 1998*/
/* For LST2:(c) Ubi Studios 1996-97*/
/* See Vincent Greco for any comment or question*/
#ifndef __SNDLST2_H__
#define __SNDLST2_H__
#define SNDLST2_C_DynamicInvalid SNDLST2_C_DoubleLinkInvalid
#define SNDLST2_M_DynamicAnchorTo(TypeElement) SNDLST2_M_AnchorTo(Dyn, TypeElement)
#define SNDLST2_M_DynamicUseListOf(type) SNDLST2_M_DoubleLinkUseListOf(Dyn, type)
#define SNDLST2_M_DynamicGetMember(handle, member) SNDLST2_M_DoubleLinkGetMember(Dyn, handle, member)
#define SNDLST2_M_DynamicSetMember(handle, member, value) SNDLST2_M_DoubleLinkSetMember(Dyn, handle, member, value)
#define SNDLST2_M_DynamicAnchorDeclaration(TypeElement) SNDLST2_M_DoubleLinkAnchorDeclaration(Dyn, TypeElement)
#define SNDLST2_M_DynamicParentDeclaration(TypeElement) SNDLST2_M_DoubleLinkParentDeclaration(Dyn, TypeElement)
#define SNDLST2_M_DynamicGetFirstElement(hAnchor) SNDLST2_M_DoubleLinkGetFirstElement(Dyn, hAnchor)
#define SNDLST2_M_DynamicGetLastElement(hAnchor) SNDLST2_M_DoubleLinkGetLastElement(Dyn, hAnchor)
#define SNDLST2_M_DynamicGetNumberOfElements(hAnchor) SNDLST2_M_DoubleLinkGetNumberOfElements(Dyn, hAnchor)
#define SNDLST2_M_DynamicSetFirstElement(hAnchor, value) SNDLST2_M_DoubleLinkSetFirstElement(Dyn, hAnchor, value)
#define SNDLST2_M_DynamicSetLastElement(hAnchor, value) SNDLST2_M_DoubleLinkSetLastElement(Dyn, hAnchor, value)
#define SNDLST2_M_DynamicInitAnchor(hAnchor) SNDLST2_M_DoubleLinkInitAnchor(Dyn, hAnchor)
#define SNDLST2_M_DynamicElementDeclaration(TypeElement) SNDLST2_M_DoubleLinkElementDeclaration(Dyn, TypeElement)
#define SNDLST2_M_DynamicChildDeclaration(TypeElement, TypeParent) SNDLST2_M_DoubleLinkChildDeclaration(Dyn, TypeElement, TypeParent)
#define SNDLST2_M_DynamicGetNextElement(hElement) SNDLST2_M_DoubleLinkGetNextElement(Dyn, hElement)
#define SNDLST2_M_DynamicGetPrevElement(hElement) SNDLST2_M_DoubleLinkGetPrevElement(Dyn, hElement)
#define SNDLST2_M_DynamicGetFather(hElement) SNDLST2_M_DoubleLinkGetFather(Dyn, hElement)
#define SNDLST2_M_DynamicSetNextElement(hElement, value) SNDLST2_M_DoubleLinkSetNextElement(Dyn, hElement, value)
#define SNDLST2_M_DynamicSetPrevElement(hElement, value) SNDLST2_M_DoubleLinkSetPrevElement(Dyn, hElement, value)
#define SNDLST2_M_DynamicSetFather(hElement, value) SNDLST2_M_DoubleLinkSetFather(Dyn, hElement, value)
#define SNDLST2_M_DynamicInitElement(hElement) SNDLST2_M_DoubleLinkInitElement(Dyn, hElement)
#define SNDLST2_M_DynamicAddTail(hAnchor, hElement) SNDLST2_M_DoubleLinkAddTail(Dyn, hAnchor, hElement)
#define SNDLST2_M_DynamicAddHead(hAnchor, hElement) SNDLST2_M_DoubleLinkAddHead(Dyn, hAnchor, hElement)
#define SNDLST2_M_DynamicIsolate(hElement) SNDLST2_M_DoubleLinkIsolate(Dyn, hElement)
#define SNDLST2_M_DynamicInsertBetween(hElement,hPrevElement,hNextElement) SNDLST2_M_DoubleLinkInsertBetween(Dyn, hElement,hPrevElement,hNextElement)
#define SNDLST2_M_DynamicWhatElementNumber(hElement0,hElement, i) SNDLST2_M_DoubleLinkWhatElementNumber(Dyn, hElement0,hElement, i)
#define SNDLST3_M_DynamicWhatElementNumber(hElement0,hAnchor, hElement, i) LST3_M_DoubleLinkWhatElementNumber(Dyn, hElement0,hAnchor,hElement, i)
#define SNDLST2_M_DynamicForEachElementOf(hAnchor, hElement, i) SNDLST2_M_DoubleLinkForEachElementOf(Dyn, hAnchor, hElement, i)
#define SNDLST2_M_DynamicForEachMovingElementOf(hAnchor, hElement, hNextElement, i) SNDLST2_M_DoubleLinkForEachMovingElementOf(Dyn, hAnchor, hElement, hNextElement, i)
#define SNDLST2_M_DynamicGetElementNumber(hAnchor, hElement, k, i) SNDLST2_M_DoubleLinkGetElementNumber(Dyn, hAnchor, hElement, k, i)
#define SNDLST2_M_DynamicGetNthBrother(hFirstElement, hElement, k, i) SNDLST2_M_DoubleLinkGetNthBrother(Dyn, hFirstElement, hElement, k, i)
#ifdef SNDLST2_StaticIsOptimised
/*----------------------------------------------------------------*/
/*"optimized" static version (all elements are consecutive) -> WITHOUT editor*/
/*not all non optimized macros are defined*/
/*#pragma message ("SNDLST2 static lists are optimized")*/
#define SNDLST2_C_StaticInvalid SNDLST2_C_StaticInvalid
#define SNDLST2_M_StaticGetMember(handle, member) SNDLST2_M_ArrayGetMember(Opt, handle, member)
#define SNDLST2_M_StaticSetMember(handle, member, value) SNDLST2_M_ArraySetMember(Opt, handle, member, value)
#define SNDLST2_M_StaticAnchorTo(TypeElement) SNDLST2_M_ArrayAnchorTo(Opt, TypeElement)
#define SNDLST2_M_StaticUseListOf(TypeElement) SNDLST2_M_ArrayUseListOf(Opt, TypeElement)
#define SNDLST2_M_StaticParentDeclaration(TypeElement) SNDLST2_M_ArrayParentDeclaration(Opt, TypeElement)
#define SNDLST2_M_StaticAnchorDeclaration(TypeElement) SNDLST2_M_ArrayAnchorDeclaration(Opt, TypeElement)
#define SNDLST2_M_StaticGetFirstElement(hAnchor) SNDLST2_M_ArrayGetFirstElement(Opt, hAnchor)
#define SNDLST2_M_StaticSetFirstElement(hAnchor, value) SNDLST2_M_ArraySetFirstElement(Opt, hAnchor, value)
#define SNDLST2_M_StaticGetNumberOfElements(hAnchor) SNDLST2_M_ArrayGetNumberOfElements(Opt, hAnchor)
#define SNDLST2_M_StaticSetNumberOfElements(hAnchor, value) SNDLST2_M_ArraySetNumberOfElements(Opt, hAnchor, value)
#define SNDLST2_M_StaticElementDeclaration(TypeElement) SNDLST2_M_ArrayElementDeclaration(Opt, TypeElement)
#define SNDLST2_M_StaticChildDeclaration(TypeElement,TypeParent) SNDLST2_M_ArrayChildDeclaration(Opt, TypeElement,TypeParent)
#define SNDLST2_M_StaticGetNextElement(_hElement) SNDLST2_M_ArrayGetNextElement(Opt, _hElement)
#define SNDLST2_M_StaticGetNthBrother(hFirstElement, hElement, k, i) SNDLST2_M_ArrayGetNthBrother(Opt, hFirstElement, hElement, k, i)
#define SNDLST2_M_StaticGetPrevElement(_hElement) SNDLST2_M_ArrayGetPrevElement(Opt, _hElement)
#define SNDLST2_M_StaticForEachElementOf(_hAnchor, _hElement, _i) SNDLST2_M_ArrayForEachElementOf(Opt, _hAnchor, _hElement, _i)
#define SNDLST2_M_StaticGetElementNumber(_hAnchor, _hElement, _k, _i) SNDLST2_M_ArrayGetElementNumber(Opt, _hAnchor, _hElement, _k, _i)
#define SNDLST2_M_StaticWhatElementNumber(_hElement0,_hAnchor, _i) SNDLST2_M_ArrayWhatElementNumber(Opt, _hElement0,_hAnchor, _i)
#define SNDLST3_M_StaticWhatElementNumber(_hElement0,_hAnchor, _hIterator, _i) SNDLST3_M_ArrayWhatElementNumber(Opt, _hElement0,_hAnchor, _hIterator, _i)
#define SNDLST2_M_StaticInitAnchor(hAnchor)
#define SNDLST2_M_StaticInitElement(hElement)
#endif
#ifdef SNDLST2_StaticIsSemiOptimised
/*----------------------------------------------------------------*/
/*"semi-optimized" static version (at the loading time elment are not consecutive */
/* but there is a function that copy them consecutively) -> WITHOUT editor*/
/* not all non optimized macros are defined*/
/*#pragma message ("SNDLST2 static lists are semi-optimized")*/
#define SNDLST2_C_StaticInvalid SNDLST2_C_StaticInvalid
#define SNDLST2_M_StaticGetMember(handle, member) SNDLST2_M_ArrayGetMember(SemiOpt, handle, member)
#define SNDLST2_M_StaticSetMember(handle, member, value) SNDLST2_M_ArraySetMember(SemiOpt, handle, member, value)
#define SNDLST2_M_StaticAnchorTo(TypeElement) SNDLST2_M_ArrayAnchorTo(SemiOpt, TypeElement)
#define SNDLST2_M_StaticUseListOf(TypeElement) SNDLST2_M_ArrayUseListOf(SemiOpt, TypeElement)
#define SNDLST2_M_StaticParentDeclaration(TypeElement) SNDLST2_M_DoubleLinkParentDeclaration(SemiOpt, TypeElement)
#define SNDLST2_M_StaticAnchorDeclaration(TypeElement) SNDLST2_M_DoubleLinkAnchorDeclaration(SemiOpt, TypeElement)
#define SNDLST2_M_StaticGetFirstElement(hAnchor) SNDLST2_M_ArrayGetFirstElement(SemiOpt, hAnchor)
#define SNDLST2_M_StaticGetNumberOfElements(hAnchor) SNDLST2_M_ArrayGetNumberOfElements(SemiOpt, hAnchor)
#define SNDLST2_M_StaticSetFirstElement(hAnchor, value) SNDLST2_M_ArraySetFirstElement(SemiOpt, hAnchor, value)
#define SNDLST2_M_StaticSetNumberOfElements(hAnchor, value) SNDLST2_M_ArraySetNumberOfElements(SemiOpt, hAnchor, value)
#define SNDLST2_M_StaticElementDeclaration(TypeElement) SNDLST2_M_DoubleLinkElementDeclaration(SemiOpt, TypeElement)
#define SNDLST2_M_StaticChildDeclaration(TypeElement,TypeParent) SNDLST2_M_DoubleLinkChildDeclaration(SemiOpt, TypeElement,TypeParent)
#define SNDLST2_M_StaticGetNextElement(_hElement) SNDLST2_M_ArrayGetNextElement(SemiOpt, _hElement)
#define SNDLST2_M_StaticGetPrevElement(_hElement) SNDLST2_M_ArrayGetPrevElement(SemiOpt, _hElement)
#define SNDLST2_M_StaticGetNthBrother(hFirstElement, hElement, k, i) SNDLST2_M_ArrayGetNthBrother(SemiOpt, hFirstElement, hElement, k, i)
#define SNDLST2_M_StaticForEachElementOf(_hAnchor, _hElement, _i) SNDLST2_M_ArrayForEachElementOf(SemiOpt, _hAnchor, _hElement, _i)
#define SNDLST2_M_StaticGetElementNumber(_hAnchor, _hElement, _k, _i) SNDLST2_M_ArrayGetElementNumber(SemiOpt, _hAnchor, _hElement, _k, _i)
#define SNDLST2_M_StaticWhatElementNumber(_hElement0,_hAnchor, _i) SNDLST2_M_ArrayWhatElementNumber(SemiOpt, _hElement0,_hAnchor, _i)
#define SNDLST3_M_StaticWhatElementNumber(_hElement0,_hAnchor, _hIterator, _i) SNDLST3_M_ArrayWhatElementNumber(SemiOpt, _hElement0,_hAnchor, _hIterator, _i)
/*#define SNDLST2_M_StaticGetLastElement(hAnchor) SNDLST2_M_DoubleLinkGetLastElement(SemiOpt, hAnchor)*/
/*#define SNDLST2_M_StaticSetLastElement(hAnchor, value) SNDLST2_M_DoubleLinkSetLastElement(SemiOpt, hAnchor, value)*/
/*#define SNDLST2_M_StaticGetFather(hElement) SNDLST2_M_DoubleLinkGetFather(SemiOpt, hElement)*/
/*#define SNDLST2_M_StaticSetNextElement(hElement, value) SNDLST2_M_DoubleLinkSetNextElement(SemiOpt, hElement, value)*/
/*#define SNDLST2_M_StaticSetPrevElement(hElement, value) SNDLST2_M_DoubleLinkSetPrevElement(SemiOpt, hElement, value)*/
/*#define SNDLST2_M_StaticSetFather(hElement, value) SNDLST2_M_DoubleLinkSetFather(SemiOpt, hElement, value)*/
#define SNDLST2_M_StaticInitElement(hElement) SNDLST2_M_DoubleLinkInitElement(SemiOpt, hElement)
#define SNDLST2_M_StaticAddTail(hAnchor, hElement) SNDLST2_M_DoubleLinkAddTail(SemiOpt, hAnchor, hElement)
#define SNDLST2_M_StaticAddHead(hAnchor, hElement) SNDLST2_M_DoubleLinkAddHead(SemiOpt, hAnchor, hElement)
#define SNDLST2_M_StaticIsolate(hElement) SNDLST2_M_DoubleLinkIsolate(SemiOpt, hElement)
#define SNDLST2_M_StaticInsertBetween(hElement,hPrevElement,hNextElement) SNDLST2_M_DoubleLinkInsertBetween(SemiOpt, hElement,hPrevElement,hNextElement)
#define SNDLST2_M_StaticConvert(_hAnchor, _dTab, _ulSize, _hDest, _hSrc, _i) \
{ \
_hDest=_dTab; \
SNDLST2_M_DoubleLinkForEachElementOf(SemiOpt, _hAnchor, _hSrc, _i) \
{ \
memcpy(_hDest, _hSrc, _ulSize); \
_hDest++; \
} \
SNDLST2_M_StaticSetFirstElement(_hAnchor, _dTab); \
}
#endif
/*--------------------------------------*/
#if !defined(SNDLST2_StaticIsOptimised)&&!defined(SNDLST2_StaticIsSemiOptimised)
/*SNDLST2_StaticIsOptimised is False*/
/*non optimized static lists are DoubleLink ones*/
/*#pragma message ("SNDLST2 static lists are NOT optimized")*/
#define SNDLST2_C_StaticInvalid SNDLST2_C_DoubleLinkInvalid
#define SNDLST2_M_StaticGetMember(handle, member) SNDLST2_M_DoubleLinkGetMember(Sta, handle, member)
#define SNDLST2_M_StaticSetMember(handle, member, value) SNDLST2_M_DoubleLinkSetMember(Sta, handle, member, value)
#define SNDLST2_M_StaticAnchorTo(TypeElement) SNDLST2_M_AnchorTo(Sta, TypeElement)
#define SNDLST2_M_StaticUseListOf(type) SNDLST2_M_DoubleLinkUseListOf(Sta, type)
#define SNDLST2_M_StaticParentDeclaration(TypeElement) SNDLST2_M_DoubleLinkParentDeclaration(Sta, TypeElement)
#define SNDLST2_M_StaticAnchorDeclaration(TypeElement) SNDLST2_M_DoubleLinkAnchorDeclaration(Sta, TypeElement)
#define SNDLST2_M_StaticGetFirstElement(hAnchor) SNDLST2_M_DoubleLinkGetFirstElement(Sta, hAnchor)
#define SNDLST2_M_StaticGetLastElement(hAnchor) SNDLST2_M_DoubleLinkGetLastElement(Sta, hAnchor)
#define SNDLST2_M_StaticGetNumberOfElements(hAnchor) SNDLST2_M_DoubleLinkGetNumberOfElements(Sta, hAnchor)
#define SNDLST2_M_StaticSetFirstElement(hAnchor, value) SNDLST2_M_DoubleLinkSetFirstElement(Sta, hAnchor, value)
#define SNDLST2_M_StaticSetLastElement(hAnchor, value) SNDLST2_M_DoubleLinkSetLastElement(Sta, hAnchor, value)
#define SNDLST2_M_StaticInitAnchor(hAnchor) SNDLST2_M_DoubleLinkInitAnchor(Sta, hAnchor)
#define SNDLST2_M_StaticElementDeclaration(TypeElement) SNDLST2_M_DoubleLinkElementDeclaration(Sta, TypeElement)
#define SNDLST2_M_StaticChildDeclaration(TypeElement, TypeParent) SNDLST2_M_DoubleLinkChildDeclaration(Sta, TypeElement, TypeParent)
#define SNDLST2_M_StaticGetNextElement(hElement) SNDLST2_M_DoubleLinkGetNextElement(Sta, hElement)
#define SNDLST2_M_StaticGetPrevElement(hElement) SNDLST2_M_DoubleLinkGetPrevElement(Sta, hElement)
#define SNDLST2_M_StaticGetFather(hElement) SNDLST2_M_DoubleLinkGetFather(Sta, hElement)
#define SNDLST2_M_StaticSetNextElement(hElement, value) SNDLST2_M_DoubleLinkSetNextElement(Sta, hElement, value)
#define SNDLST2_M_StaticSetPrevElement(hElement, value) SNDLST2_M_DoubleLinkSetPrevElement(Sta, hElement, value)
#define SNDLST2_M_StaticSetFather(hElement, value) SNDLST2_M_DoubleLinkSetFather(Sta, hElement, value)
#define SNDLST2_M_StaticInitElement(hElement) SNDLST2_M_DoubleLinkInitElement(Sta, hElement)
#define SNDLST2_M_StaticAddTail(hAnchor, hElement) SNDLST2_M_DoubleLinkAddTail(Sta, hAnchor, hElement)
#define SNDLST2_M_StaticAddHead(hAnchor, hElement) SNDLST2_M_DoubleLinkAddHead(Sta, hAnchor, hElement)
#define SNDLST2_M_StaticIsolate(hElement) SNDLST2_M_DoubleLinkIsolate(Sta, hElement)
#define SNDLST2_M_StaticInsertBetween(hElement,hPrevElement,hNextElement) SNDLST2_M_DoubleLinkInsertBetween(Sta, hElement,hPrevElement,hNextElement)
#define SNDLST2_M_StaticWhatElementNumber(hElement0,hElement, i) SNDLST2_M_DoubleLinkWhatElementNumber(Sta, hElement0,hElement, i)
#define SNDLST3_M_StaticWhatElementNumber(hElement0, hAnchor, hElement, i) SNDLST3_M_DoubleLinkWhatElementNumber(Sta, hElement0, hAnchor, hElement, i)
#define SNDLST2_M_StaticForEachElementOf(hAnchor, hElement, i) SNDLST2_M_DoubleLinkForEachElementOf(Sta, hAnchor, hElement, i)
/*this macro will be removed very soon (no moving element in a static list !)*/
#define SNDLST2_M_StaticForEachMovingElementOf(hAnchor, hElement, hNextElement, i) SNDLST2_M_DoubleLinkForEachMovingElementOf(Sta, hAnchor, hElement, hNextElement, i)
#define SNDLST2_M_StaticGetElementNumber(hAnchor, hElement, k, i) SNDLST2_M_DoubleLinkGetElementNumber(Sta, hAnchor, hElement, k, i)
#define SNDLST2_M_StaticGetNthBrother(hFirstElement, hElement, k, i) SNDLST2_M_DoubleLinkGetNthBrother(Sta, hFirstElement, hElement, k, i)
#endif /*SNDLST2_StaticIsOptimised*/
/*----------------------------------------------------------------------------------------*/
#define SNDLST2_C_ArrayInvalid -1
#define SNDLST2_M_ArrayGetMember(n, handle, member) \
((handle)->member##n)
#define SNDLST2_M_ArraySetMember(n, handle, member, value) \
{(handle)->member##n=(value);}
#define SNDLST2_M_ArrayAnchorTo(n, TypeElement) \
SNDLST2_M_AnchorTo(n, TypeElement)
#define SNDLST2_M_ArrayUseListOf(n, TypeElement) \
SNDLST2_M_ArrayAnchorTo(n, TypeElement) \
{ \
TypeElement hFirstElement##n; \
long lNumberOfElements##n; \
}
/*do not add ";" at the end of this macro*/
#define SNDLST2_M_ArrayParentDeclaration(n, TypeElement) \
TypeElement hFirstElement##n; \
long lNumberOfElements##n;
/*declaration, access and init macros for a Anchor*/
/*do not add ";" at the end of this macro*/
#define SNDLST2_M_ArrayAnchorDeclaration(n, TypeElement) \
SNDLST2_M_ArrayAnchorTo(n, TypeElement)
#define SNDLST2_M_ArrayGetFirstElement(n, hAnchor) \
SNDLST2_M_ArrayGetMember(n, (hAnchor), hFirstElement)
#define SNDLST2_M_ArraySetFirstElement(n, hAnchor, value) \
SNDLST2_M_ArraySetMember(n, (hAnchor), hFirstElement, (value))
#define SNDLST2_M_ArrayGetNumberOfElements(n, hAnchor) \
SNDLST2_M_ArrayGetMember(n, (hAnchor), lNumberOfElements)
#define SNDLST2_M_ArraySetNumberOfElements(n, hAnchor, value) \
SNDLST2_M_ArraySetMember(n, (hAnchor), lNumberOfElements, (value))
/*do not add ";" at the end of this macro*/
#define SNDLST2_M_ArrayElementDeclaration(n, TypeElement)
#define SNDLST2_M_ArrayChildDeclaration(n, TypeElement,TypeParent)
#define SNDLST2_M_ArrayGetNextElement(n, _hElement) \
((_hElement)+1)
#define SNDLST2_M_ArrayGetNthBrother(n, hFirstElement, hElement, k, i) \
{(hElement)=(hFirstElement)+(k); i=i;}
#define SNDLST2_M_ArrayGetPrevElement(n, _hElement) \
((_hElement)-1)
#define SNDLST2_M_ArrayForEachElementOf(n, _hAnchor, _hElement, _i) \
for((_hElement)=SNDLST2_M_ArrayGetFirstElement(n, (_hAnchor)),(_i)=0; \
(_i)<SNDLST2_M_ArrayGetNumberOfElements(n, (_hAnchor)); \
(_i)++,(_hElement)=SNDLST2_M_ArrayGetNextElement(n, _hElement))
#define SNDLST2_M_ArrayGetElementNumber(n, _hAnchor, _hElement, _k, _i) \
{(_hElement)=SNDLST2_M_ArrayGetFirstElement(n, (_hAnchor))+(_k);(_i)=0;}
/*ATTENTION The parameters are not the same than non optimized version !!!*/
/*use the following one*/
#define SNDLST2_M_ArrayWhatElementNumber(n, _hElement0,_hAnchor, _i) \
{_i=(_hElement0) - SNDLST2_M_ArrayGetFirstElement(n, (_hAnchor));}
#define SNDLST3_M_ArrayWhatElementNumber(n, _hElement0,_hAnchor, _hIterator, _i) \
{ _i=(_hElement0) - SNDLST2_M_ArrayGetFirstElement(n, (_hAnchor));_hIterator=0;}
/*----------------------------------------------------------------------------------------*/
/*debug version (with holes) -> with or without editor*/
/* handles are pointers*/
#define SNDLST2_C_DoubleLinkInvalid 0 /*NULL*/
#define SNDLST2_M_DoubleLinkGetMember(n, handle, member) \
((handle)->member##n)
#define SNDLST2_M_DoubleLinkSetMember(n, handle, member, value) \
{(handle)->member##n=(value);}
#define SNDLST2_M_AnchorTo(n, TypeElement) struct SNDLST2_tdstAnchorTo##TypeElement##n
#define SNDLST2_M_DoubleLinkUseListOf(n, TypeElement) \
SNDLST2_M_AnchorTo(n, TypeElement) \
{ \
TypeElement hFirstElement##n; \
TypeElement hLastElement##n; \
long lNumberOfElements##n; \
}
#define SNDLST2_M_DoubleLinkParentDeclaration(n, TypeElement) \
TypeElement hFirstElement##n; \
TypeElement hLastElement##n; \
long lNumberOfElements##n;
/*declaration, access and init macros for a Anchor*/
/*do not add ";" at the end of this macro*/
#define SNDLST2_M_DoubleLinkAnchorDeclaration(n, TypeElement) \
SNDLST2_M_AnchorTo(n, TypeElement)
#define SNDLST2_M_DoubleLinkGetFirstElement(n, hAnchor) \
SNDLST2_M_DoubleLinkGetMember(n, hAnchor, hFirstElement)
#define SNDLST2_M_DoubleLinkGetLastElement(n, hAnchor) \
SNDLST2_M_DoubleLinkGetMember(n, hAnchor, hLastElement)
#define SNDLST2_M_DoubleLinkSetFirstElement(n, hAnchor, value) \
SNDLST2_M_DoubleLinkGetMember(n, hAnchor, hFirstElement) = (value)
#define SNDLST2_M_DoubleLinkGetNumberOfElements(n, hAnchor) \
SNDLST2_M_DoubleLinkGetMember(n, hAnchor, lNumberOfElements)
#define SNDLST2_M_DoubleLinkSetLastElement(n, hAnchor, value) \
SNDLST2_M_DoubleLinkGetMember(n, hAnchor, hLastElement) = (value)
#define SNDLST2_M_DoubleLinkInitAnchor(n, hAnchor) \
{ \
SNDLST2_M_DoubleLinkGetFirstElement(n, (hAnchor))= SNDLST2_C_DoubleLinkInvalid; \
SNDLST2_M_DoubleLinkGetLastElement(n, (hAnchor)) = SNDLST2_C_DoubleLinkInvalid; \
SNDLST2_M_DoubleLinkGetNumberOfElements(n, (hAnchor))= 0; \
}
/*declaration, access and init macros for a Element*/
/*do not add ";" at the end of this macro*/
#define SNDLST2_M_DoubleLinkElementDeclaration(n, TypeElement) \
TypeElement hNextBrother##n; \
TypeElement hPrevBrother##n; \
SNDLST2_M_AnchorTo(n, TypeElement)* hFather##n;
#define SNDLST2_M_DoubleLinkChildDeclaration(n, TypeElement, TypeFather) \
TypeElement hNextBrother##n; \
TypeElement hPrevBrother##n; \
TypeFather hFather##n;
#define SNDLST2_M_DoubleLinkGetNextElement(n, hElement) \
SNDLST2_M_DoubleLinkGetMember(n, (hElement), hNextBrother)
#define SNDLST2_M_DoubleLinkGetPrevElement(n, hElement) \
SNDLST2_M_DoubleLinkGetMember(n, (hElement), hPrevBrother)
#define SNDLST2_M_DoubleLinkGetFather(n, hSO) \
SNDLST2_M_DoubleLinkGetMember(n, (hSO), hFather)
#define SNDLST2_M_DoubleLinkSetNextElement(n, hElement, value) \
SNDLST2_M_DoubleLinkGetMember(n, (hElement), hNextBrother) = (value)
#define SNDLST2_M_DoubleLinkSetPrevElement(n, hElement, value) \
SNDLST2_M_DoubleLinkGetMember(n, (hElement), hPrevBrother) = (value)
#define SNDLST2_M_DoubleLinkSetFather(n, hSO, value) \
SNDLST2_M_DoubleLinkGetMember(n, (hSO), hFather) = (value)
#define SNDLST2_M_DoubleLinkInitElement(n, hElement) \
{ \
SNDLST2_M_DoubleLinkGetNextElement(n, (hElement))= SNDLST2_C_DoubleLinkInvalid; \
SNDLST2_M_DoubleLinkGetPrevElement(n, (hElement))= SNDLST2_C_DoubleLinkInvalid; \
SNDLST2_M_DoubleLinkGetFather(n, (hElement)) = SNDLST2_C_DoubleLinkInvalid; \
}
#define SNDLST2_M_DoubleLinkIsolate(n, hElement) \
{ \
if(SNDLST2_M_DoubleLinkGetNextElement(n, (hElement))!=SNDLST2_C_DoubleLinkInvalid) \
SNDLST2_M_DoubleLinkGetPrevElement(n, SNDLST2_M_DoubleLinkGetNextElement(n, (hElement))) = SNDLST2_M_DoubleLinkGetPrevElement(n, (hElement)); \
if(SNDLST2_M_DoubleLinkGetPrevElement(n, (hElement))!=SNDLST2_C_DoubleLinkInvalid) \
SNDLST2_M_DoubleLinkGetNextElement(n, SNDLST2_M_DoubleLinkGetPrevElement(n, (hElement))) = SNDLST2_M_DoubleLinkGetNextElement(n, (hElement)); \
if(SNDLST2_M_DoubleLinkGetFather(n, (hElement))!=SNDLST2_C_DoubleLinkInvalid) \
{ \
SNDLST2_M_DoubleLinkGetNumberOfElements(n, SNDLST2_M_DoubleLinkGetFather(n, (hElement)))--; \
if(SNDLST2_M_DoubleLinkGetFirstElement(n, SNDLST2_M_DoubleLinkGetFather(n, (hElement)))==(hElement)) \
SNDLST2_M_DoubleLinkGetFirstElement(n, SNDLST2_M_DoubleLinkGetFather(n, (hElement))) = SNDLST2_M_DoubleLinkGetNextElement(n, (hElement)); \
if(SNDLST2_M_DoubleLinkGetLastElement(n, SNDLST2_M_DoubleLinkGetFather(n, (hElement)))==(hElement)) \
SNDLST2_M_DoubleLinkGetLastElement(n, SNDLST2_M_DoubleLinkGetFather(n, (hElement))) = SNDLST2_M_DoubleLinkGetPrevElement(n, (hElement)); \
} \
SNDLST2_M_DoubleLinkInitElement(n, (hElement)); \
}
#define SNDLST2_M_DoubleLinkAddTail(n, hAnchor, hElement) \
{ \
SNDLST2_M_DoubleLinkIsolate(n, (hElement)); \
SNDLST2_M_DoubleLinkGetNextElement(n, (hElement)) = SNDLST2_C_DoubleLinkInvalid; \
SNDLST2_M_DoubleLinkGetPrevElement(n, (hElement)) = SNDLST2_M_DoubleLinkGetLastElement(n, (hAnchor)); \
SNDLST2_M_DoubleLinkGetFather(n, (hElement)) = (hAnchor); \
if (SNDLST2_M_DoubleLinkGetFirstElement(n, (hAnchor))==SNDLST2_C_DoubleLinkInvalid) \
SNDLST2_M_DoubleLinkGetFirstElement(n, (hAnchor)) = (hElement); \
else \
SNDLST2_M_DoubleLinkGetNextElement(n, SNDLST2_M_DoubleLinkGetLastElement(n, (hAnchor))) = (hElement); \
SNDLST2_M_DoubleLinkGetLastElement(n, (hAnchor)) = (hElement); \
SNDLST2_M_DoubleLinkGetNumberOfElements(n, (hAnchor))++; \
}
#define SNDLST2_M_DoubleLinkAddHead(n, hAnchor,hElement) \
{ \
SNDLST2_M_DoubleLinkIsolate(n, (hElement)); \
SNDLST2_M_DoubleLinkGetPrevElement(n, (hElement)) = SNDLST2_C_DoubleLinkInvalid; \
SNDLST2_M_DoubleLinkGetNextElement(n, (hElement)) = SNDLST2_M_DoubleLinkGetFirstElement(n, (hAnchor)); \
SNDLST2_M_DoubleLinkGetFather(n, (hElement)) = (hAnchor); \
if (SNDLST2_M_DoubleLinkGetLastElement(n, (hAnchor))==SNDLST2_C_DoubleLinkInvalid) \
SNDLST2_M_DoubleLinkGetLastElement(n, (hAnchor)) = (hElement); \
else \
SNDLST2_M_DoubleLinkGetPrevElement(n, SNDLST2_M_DoubleLinkGetFirstElement(n, (hAnchor))) = (hElement); \
SNDLST2_M_DoubleLinkGetFirstElement(n, (hAnchor)) = (hElement); \
SNDLST2_M_DoubleLinkGetNumberOfElements(n, (hAnchor))++; \
}
#define SNDLST2_M_DoubleLinkInsertBetween(n, hElement,hPrevElement,hNextElement) \
{ \
SNDLST2_M_DoubleLinkIsolate(n, (hElement)); \
SNDLST2_M_DoubleLinkGetNextElement(n, (hElement)) = (hNextElement); \
SNDLST2_M_DoubleLinkGetPrevElement(n, (hElement)) = (hPrevElement); \
if((hPrevElement)!=SNDLST2_C_DoubleLinkInvalid) \
{ \
SNDLST2_M_DoubleLinkGetNextElement(n, (hPrevElement)) = (hElement); \
SNDLST2_M_DoubleLinkGetFather(n, (hElement)) = SNDLST2_M_DoubleLinkGetFather(n, (hPrevElement)); \
} \
else \
{ \
SNDLST2_M_DoubleLinkGetFirstElement(n, SNDLST2_M_DoubleLinkGetFather(n, (hNextElement))) = (hElement); \
} \
if((hNextElement)!=SNDLST2_C_DoubleLinkInvalid) \
{ \
SNDLST2_M_DoubleLinkGetPrevElement(n, (hNextElement)) = (hElement); \
SNDLST2_M_DoubleLinkGetFather(n, (hElement)) = SNDLST2_M_DoubleLinkGetFather(n, (hNextElement)); \
} \
else \
{ \
SNDLST2_M_DoubleLinkGetLastElement(n, SNDLST2_M_DoubleLinkGetFather(n, (hPrevElement))) = (hElement); \
} \
SNDLST2_M_DoubleLinkGetNumberOfElements(n, SNDLST2_M_DoubleLinkGetFather(n, (hElement)))++; \
}
/*to be changed ! the arguments are not the same in optimised mode !!!*/
/*use the following one*/
#define SNDLST2_M_DoubleLinkWhatElementNumber(n, hElement0,hElement, i) \
{for \
( \
i=-1,(hElement)=(hElement0); \
(hElement)!=SNDLST2_C_DoubleLinkInvalid; \
i++,(hElement)=SNDLST2_M_DoubleLinkGetPrevElement(n,(hElement)) \
);}
#define SNDLST3_M_DoubleLinkWhatElementNumber(n, hElement0,hAnchor, hElement, i) \
{for \
( \
hAnchor=hAnchor,i=-1,(hElement)=(hElement0); \
(hElement)!=SNDLST2_C_DoubleLinkInvalid; \
i++,(hElement)=SNDLST2_M_DoubleLinkGetPrevElement(n,(hElement)) \
);}
#define SNDLST2_M_DoubleLinkForEachElementOf(n, hAnchor, hElement, i) \
for \
( \
(i)=0,(hElement)=SNDLST2_M_DoubleLinkGetFirstElement(n, (hAnchor)); \
(hElement)!=SNDLST2_C_DoubleLinkInvalid; \
(i)++,hElement=SNDLST2_M_DoubleLinkGetNextElement(n, (hElement)) \
)
#define SNDLST2_M_DoubleLinkForEachMovingElementOf(n, hAnchor, hElement, hNextElement, i) \
for \
( \
(i)=0,(hElement)=SNDLST2_M_DoubleLinkGetFirstElement(n, (hAnchor)),(hNextElement)=(hElement)?SNDLST2_M_DoubleLinkGetNextElement(n,(hElement)):SNDLST2_C_DoubleLinkInvalid; \
(hElement)!=SNDLST2_C_DoubleLinkInvalid; \
(i)++,(hElement)=(hNextElement),(hNextElement)=(hElement)?SNDLST2_M_DoubleLinkGetNextElement(n, (hElement)):SNDLST2_C_DoubleLinkInvalid \
)
/*k number of the child to get, i index, hElement found element*/
#define SNDLST2_M_DoubleLinkGetElementNumber(n, hAnchor, hElement, k, i) \
{ \
for \
( \
(i)=0,(hElement)=SNDLST2_M_DoubleLinkGetFirstElement(n, (hAnchor)); \
(i)<(k); \
(i)++,(hElement)=SNDLST2_M_DoubleLinkGetNextElement(n, (hElement)) \
); \
}
/*if k==1 => NextBrother*/
#define SNDLST2_M_DoubleLinkGetNthBrother(n, hFirstElement, hElement, k, i) \
{ \
for \
( \
(i)=0,(hElement)=hFirstElement; \
(i)<(k); \
(i)++,(hElement)=SNDLST2_M_DoubleLinkGetNextElement(n, (hElement)) \
); \
}
#endif /* __SNDLST2_H__*/

View File

@@ -0,0 +1,91 @@
#ifndef _SNDMPEG_H_
#define _SNDMPEG_H_
/*#include "sndtype.h"*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
#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(DLLMPEG_MODULE)
#pragma message("-> sndmpeg : functions pointers defined in SNDDLL.H")
#else
DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lPlayMPEG(tduRefRes res,SampleParam *par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vRemoveCallbackMPEG(long voice);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bSetParamMPEG(long voice,SampleParam *par);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bTestIsPlayingMPEG(long voice);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vStopMPEG(long voice);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vPauseMPEG(long voice);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vResumeMPEG(long voice);
DLL_IMPEXP CPA_EXPORT int SND_CALL SND_fn_iInitMPEG(SND_tdstInitStruct *pInitStruct);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bTestInitMPEG(void);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vDesInitMPEG(void);
DLL_IMPEXP CPA_EXPORT tduRefRes SND_CALL SND_fn_tdGetResForVoiceMPEG(long voice);
/*DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vConvertResDiskToMemMPEG(tdstBlockResourceDisk *disk*/
/* ,tdstBlockResourceMem *mem*/
/* ,void* ptrBegin);*/
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bLoadResScriptMPEG(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bLoadResBinaryMPEG(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,char *pDataBloc);
/*DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vLoadResFromDiskMPEG(tdstBlockResourceDisk* disk,tdstBlockResourceMem* mem);*/
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vUnLoadResMPEG(tdstBlockResourceMem* mem);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bIsResLoadedMPEG(tdstBlockResourceMem *mem);
/*DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSetResUnloadedMPEG(tdstBlockResourceMem *pResMem);*/
DLL_IMPEXP CPA_EXPORT SndReal SND_CALL SND_fn_rGetPosMPEG(long voice);
DLL_IMPEXP CPA_EXPORT SndReal SND_CALL SND_fn_rGetLengthMPEG(long voice);
/*---themes*/
DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lPlayTransitionMPEG(tduRefRes FirstRes,tduRefRes NextRes,SND_td_pfn_vSoundCallback transition_callback,long param_callback,SampleParam* par);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bSetParamTransitionMPEG(long voice,SampleParam* par);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bSetNextTransitionMPEG(long voice,tduRefRes new_res);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bDoTransitionWithFadeMPEG(long voice,tduRefRes new_res);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bDoTransitionWithFadeMPEG2( long voice, tduRefRes new_res, SndReal rDuration );
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vStopTransitionMPEG(long voice);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vPauseTransitionMPEG(long voice);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vResumeTransitionMPEG(long voice);
#ifndef NO_ACP_LDBIN
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bCanFreeDataMPEG(void);
#endif
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vReleaseDriverMPEG(void);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vRestoreDriverMPEG(void);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSynchroMPEG(void);
DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lCreateNewBufferExMPEG(SND_tdstFormat* pformat,SND_tdstCallback* pCallback,SoundParam* par,long user_id);
DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lGetPosBufferExMPEG(long id_buffer);
DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lPushBufferExMPEG(long id_buffer,SND_tdstStackBuffer* pStack);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSetDefaultRollOffMPEG(RollOffParam* rolloff);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bCheckVersionResourceMPEG(tdstBlockResourceDisk* disk);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bSetResourceStaticVolumeMPEG(tdstBlockResourceMem* pstRes,unsigned char ucVolume);
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SNDXD_H_*/

View File

@@ -0,0 +1,177 @@
#ifndef _SNDPLAY_H_
#define _SNDPLAY_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/*
//////////////////////////////////////////////////////////////
// SNDPLAY.H Version 2.0 //
//////////////////////////////////////////////////////////////
// Module d'exploitation bas-niveau du son //
//////////////////////////////////////////////////////////////
*/
/* OPTIONS PERMETTANT DE CREER DES DLL ( A TERME, ELLE SERONT PEUT-ETRE AILLEURS):*/
/****************************************/
#undef CPA_EXPORT
/****************************************/
#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
/****************************************/
/*#include "SND/sndtype.h"*/
/* fonctions et prototypes publiques definies par SNDXD.C */
CPA_EXPORT long SND_fn_lPlaySnd(tduRefRes num_res,SoundParam* par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback,SndBool* active);
CPA_EXPORT SndBool SND_CALL SND_fn_bSetParamSnd(long voie,SoundParam* par);
CPA_EXPORT SndBool SND_fn_bTestIsPlayingSnd(long voie);
CPA_EXPORT void SND_CALL SND_fn_vStopSnd(long voie);
CPA_EXPORT void SND_CALL SND_fn_vPauseSnd(long voie);
CPA_EXPORT void SND_CALL SND_fn_vResumeSnd(long voie);
CPA_EXPORT void SND_fn_vRemoveCallbackSnd(long voie);
CPA_EXPORT SndReal SND_CALL SND_fn_rGetPosSnd(long voice);
CPA_EXPORT SndReal SND_CALL SND_fn_rGetLengthSnd(long voice);
CPA_EXPORT void SND_fn_vPauseAllSnd(void);
CPA_EXPORT void SND_fn_vResumeAllSnd(void);
CPA_EXPORT void SND_fn_vSetSoundVolumeSnd(char new_vol);
CPA_EXPORT unsigned char SND_fn_ucGetSoundVolumeSnd(void);
CPA_EXPORT void SND_fn_vSetStereoSnd(SndBool active);
CPA_EXPORT SndBool SND_fn_bGetStereoSnd(void);
CPA_EXPORT SndBool SND_fn_bIsMusicPlayingSnd(void);
CPA_EXPORT void SND_fn_vSetReverseStereoSnd(SndBool active);
CPA_EXPORT SndBool SND_fn_bGetReverseStereoSnd(void);
CPA_EXPORT void SND_fn_vSetDopplerFactorSnd(SndReal factor);
CPA_EXPORT void SND_fn_vSetDefaultRollOffSnd(RollOffParam *rolloff);
CPA_EXPORT int SND_fn_iInitSnd(SND_tdstInitStruct *pInitStruct);
CPA_EXPORT SndBool SND_fn_bTestFinInitSnd(void);
CPA_EXPORT void SND_fn_vDesInitSnd(void);
CPA_EXPORT int SND_fn_iInitBnkSnd(long num);
CPA_EXPORT SndBool SND_fn_bTestFinInitBnkSnd(long num);
CPA_EXPORT void SND_fn_vDesInitBnkSnd(long num);
CPA_EXPORT void SND_fn_vDesInitAllBnkSnd(void);
CPA_EXPORT void SND_fn_vSetEffectSnd(long id);
CPA_EXPORT long SND_fn_lCreateMicroSnd(MicroParam* par);
CPA_EXPORT void SND_fn_vSetMicroParamSnd(long sndId,MicroParam* par);
CPA_EXPORT void SND_fn_vDestroyMicroSnd(long sndId);
/* CPA_EXPORT void SND_fn_vLoadResFromDiskSnd(tdstBlockResourceDisk* disk,tdstBlockResourceMem* mem);*/
#ifndef NO_ACP_SCRIPT
CPA_EXPORT SndBool SND_fn_bLoadResScriptSnd(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
#endif
#ifndef NO_ACP_LDBIN
CPA_EXPORT SndBool SND_fn_bLoadResBinarySnd(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,char *pDataBloc);
#endif
/* void SND_fn_vSetResUnloadedSnd(tdstBlockResourceMem *pResMem);*/
CPA_EXPORT void SND_fn_vUnLoadResSnd(tdstBlockResourceMem* mem);
CPA_EXPORT void SND_fn_vStopBeforeUnLoadResSnd(tdstBlockResourceMem* mem);
/* OBSOLETE: now treated by SOUND3D
extern CPA_EXPORT long SND_fn_lPlaySwitch(tduRefRes num_res,SoundParam* par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback,SndBool* active);
extern CPA_EXPORT SndBool SND_fn_bSetParamSwitch(long voie,SoundParam* par);
extern CPA_EXPORT SndBool SND_fn_bTestIsPlayingSwitch(long voie);
extern CPA_EXPORT void SND_fn_vStopSwitch(long voie);
extern CPA_EXPORT void SND_fn_vPauseSwitch(long voie);
extern CPA_EXPORT void SND_fn_vResumeSwitch(long voie);
extern CPA_EXPORT void SND_fn_vRemoveCallbackSwitch(long voie);
extern CPA_EXPORT void SND_fn_vConvertResDiskToMemSwitch(tdstBlockResourceDisk* disk,tdstBlockResourceMem* mem,void* ptrBegin);
*/
CPA_EXPORT long SND_fn_lPlaySplit(tduRefRes num_res,SoundParam* par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback,SndBool* active);
CPA_EXPORT SndBool SND_CALL SND_fn_bSetParamSplit(long voie,SoundParam* par);
CPA_EXPORT SndBool SND_CALL SND_fn_bTestIsPlayingSplit(long voie);
CPA_EXPORT void SND_CALL SND_fn_vStopSplit(long voie);
CPA_EXPORT void SND_CALL SND_fn_vPauseSplit(long voie);
CPA_EXPORT void SND_CALL SND_fn_vResumeSplit(long voie);
CPA_EXPORT void SND_fn_vRemoveCallbackSplit(long voie);
/* CPA_EXPORT void SND_fn_vConvertResDiskToMemSplit(tdstBlockResourceDisk* disk,tdstBlockResourceMem* mem,void* ptrBegin);*/
CPA_EXPORT SndReal SND_CALL SND_fn_rGetPosSplit(long voie);
CPA_EXPORT SndReal SND_CALL SND_fn_rGetLengthSplit(long voie);
CPA_EXPORT SndBool SND_fn_bLoadResScriptSplit(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
CPA_EXPORT SndBool SND_fn_bLoadResBinarySplit(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,char *pDataBloc);
CPA_EXPORT void SND_fn_vInitRangeSplit(tdstRangeSplitMem* pRange);
CPA_EXPORT void SND_fn_vConvertOneResDiskToMem(tdstBlockResourceDisk *disk,
tdstBlockResourceMem *mem,
void* ptrBegin);
CPA_EXPORT SndBool SND_fn_bIsResourceSwitch(tduRefRes res);
/* CPA_EXPORT long SND_fn_lGetSwitchInfoSnd(tduRefRes res_switch);*/
CPA_EXPORT SoundParam* SND_fn_pCreateSoundParam(int nb_micro);
CPA_EXPORT void SND_fn_vCopySoundParam(SoundParam*_pDest,SoundParam* _pSrc);
CPA_EXPORT void SND_fn_vDestroySoundParam(SoundParam* _pObj);
void invalidate_ptrvalid_snd(long voice);
/*--theme*/
CPA_EXPORT long SND_fn_lPlayTransitionSnd(tduRefRes FirstRes,tduRefRes NextRes,SND_td_pfn_vSoundCallback transition_callback,long param_callback,SoundParam* par);
CPA_EXPORT SndBool SND_fn_bSetNextTransitionSnd(long voice,tduRefRes new_res);
CPA_EXPORT SndBool SND_fn_bDoTransitionWithFadeSnd(long voice,tduRefRes new_res);
CPA_EXPORT SndBool SND_fn_bDoTransitionWithFadeSnd2( long voice, tduRefRes new_res, SndReal rDuration );
CPA_EXPORT void SND_fn_vStopTransitionSnd(long voice);
CPA_EXPORT void SND_fn_vPauseTransitionSnd(long voice);
CPA_EXPORT void SND_fn_vResumeTransitionSnd(long voice);
CPA_EXPORT SndBool SND_fn_bSetParamTransitionSnd(long voice,SoundParam *par);
CPA_EXPORT void SND_fn_vSynchroSnd();
/*--relache-reprise a chaud des drives*/
CPA_EXPORT void SND_fn_vReleaseDriverSnd();
CPA_EXPORT void SND_fn_vRestoreDriverSnd();
CPA_EXPORT void SND_fn_vForceReleaseDriverSnd();
CPA_EXPORT void SND_fn_vForceRestoreDriverSnd();
CPA_EXPORT void SND_fn_vGetTargetLabelSnd(char* name,int nb_char);
CPA_EXPORT void SND_fn_vSetupTargetSnd();
CPA_EXPORT SndBool SND_fn_bCanSetupTargetSnd();
CPA_EXPORT long SND_fn_lCreateNewBufferSnd(unsigned long nb_samples,unsigned short uwResolution,unsigned short uwNbChannels,unsigned long ulFreq,SoundParam* par,td_pfn_vRefreshBufferClient callback,long user_id);
CPA_EXPORT void SND_fn_vDeleteBufferSnd(long id_buffer);
CPA_EXPORT void SND_fn_vPauseBufferSnd(long id_buffer);
CPA_EXPORT void SND_fn_vResumeBufferSnd(long id_buffer);
CPA_EXPORT SndReal SND_fn_rGetPosBufferSnd(long id_buffer);
CPA_EXPORT void SND_fn_vSetParamBufferSnd(long id_buffer,SoundParam* par);
CPA_EXPORT long SND_fn_lCreateNewBufferExSnd(SND_tdstFormat* pformat,SND_tdstCallback* pCallback,SoundParam* par,long user_id);
CPA_EXPORT long SND_fn_lGetPosBufferExSnd(long id_buffer);
CPA_EXPORT long SND_fn_lPushBufferExSnd(long id_buffer,SND_tdstStackBuffer* pStack);
CPA_EXPORT tduRefRes SND_fn_tduGetLowestResourceSnd(tduRefRes uHighRes,SoundParam* par,SndBool eval);
CPA_EXPORT long SND_fn_lGetNbVoiceOptimumSnd();
CPA_EXPORT long SND_fn_lGetNbVoiceWishedSnd();
CPA_EXPORT void SND_fn_vSetNbVoiceWishedSnd(long nb);
CPA_EXPORT tduRefRes SND_fn_uGenerateResourceSnd(void* data,SND_tdstFormat* pformat,SndBool loop);
CPA_EXPORT void SND_fn_vDestroyResourceSnd(tduRefRes uRes);
CPA_EXPORT SndBool SND_fn_bTestFormatRecordSnd(SND_tdstFormat* pformat,int flags);
CPA_EXPORT long SND_fn_lCreateBufferRecordSnd(SND_tdstFormat* pformat,SND_tdstCallback* pCallback);
CPA_EXPORT SndBool SND_fn_bIsBufferFullDuplexRecordSnd(long id_buffer);
CPA_EXPORT SndBool SND_fn_bStartRecordSnd(long id_buffer);
CPA_EXPORT void SND_fn_vStopRecordSnd(long id_buffer);
CPA_EXPORT SndBool SND_fn_bIsWorkingRecordSnd(long id_buffer);
CPA_EXPORT long SND_fn_lPushBufferToRecordSnd(long id_buffer,void* ptr,int size_ptr);
CPA_EXPORT SndBool SND_fn_bManageMsgForRecordSnd(long p_msg);
CPA_EXPORT unsigned char SND_fn_ucGetInstantVuMeterRecordSnd(void);
CPA_EXPORT SndBool SND_fn_bSetResourceStaticVolumeSnd(tdstBlockResourceMem* pstRes,unsigned char ucVolume);
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SNDPLAY_H_*/

View File

@@ -0,0 +1,41 @@
#ifndef __SNDREC_H__
#define __SNDREC_H__
#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
/*#include "sndtype.h"*/
#if defined(_DLL_COMPILATION_MODE) && !defined(DLLRECORD_MODULE)
#pragma message("-> sndrec : functions pointers defined in SNDDLL.H")
#else
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bTestFormatRecord(SND_tdstFormat* pformat,int flags);
DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lCreateBufferRecord(SND_tdstFormat* pformat,SND_tdstCallback* pCallback);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bIsBufferFullDuplexRecord(long id_buffer);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bStartRecord(long id_buffer);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vStopRecord(long id_buffer);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bIsWorkingRecord(long id_buffer);
DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lPushBufferToRecord(long id_buffer,void* ptr,int size_ptr);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bManageMsgForRecord(long p_msg);
DLL_IMPEXP CPA_EXPORT int SND_CALL SND_fn_iInitRecord(SND_tdstInitStruct *pInitStruct);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vDesInitRecord(void);
DLL_IMPEXP CPA_EXPORT unsigned char SND_CALL SND_fn_ucGetInstantVuMeterRecord(void);
#endif
#endif /*__SNDREC_H__*/

View File

@@ -0,0 +1,453 @@
#ifndef _SNDRES_H_
#define _SNDRES_H_
#ifdef SND_SCRIPT_VERSION /*Mode Script pur*/
#if defined(SNDLST2_StaticIsOptimised) || defined(LST2_StaticIsOptimised)
#error Macros not coherent
#endif
#endif
#ifdef SND_HYBRID_VERSION /*Mode Hybride*/
#define LST2_StaticIsOptimised
#define SNDLST2_StaticIsOptimised
#endif
#ifdef SND_BINARY_VERSION /*Mode Binaire pur*/
#define LST2_StaticIsOptimised
#define SNDLST2_StaticIsOptimised
#endif
#if ((!defined(SND_SCRIPT_VERSION))&&((!defined(SND_HYBRID_VERSION))&&(!defined(SND_BINARY_VERSION))))
#error neither SCRIPT,HYBRID, or BINARY defined
#endif
#include "sndlst2.h"
/*-------------------------------------------------------------------------*/
/*definitions specifiques <20> la target*/
#include "sndhard.h"
/****************************************************************/
/* Structures portables pour les Ressources */
/****************************************************************/
#define SND_C_RES_FANTOME_PTR NULL
#define SND_C_RES_FANTOME_ID -1
extern tduRefRes SND_RES_FANTOME;
typedef enum _tdeTypeResource{
TYPE_INVALID,
TYPE_SAMPLE,
TYPE_MIDI,
TYPE_CDAUDIO,
TYPE_SEQUENCE,
TYPE_SWITCH_OLD,
TYPE_SPLIT,
TYPE_THEME_OLD,
TYPE_SWITCH,
TYPE_THEME_OLD2,
TYPE_RANDOM,
TYPE_THEME,
TYPE_FOR_ALIGNEMENT=SND_ENUM_ALIGNEMENT
} tdeTypeResource;
#define NB_TYPES_RESOURCES 12
/* AJOUT FRED DECREAU : A VALIDER!!*/
typedef enum{
TYPE_EXTERNAL, /*les data sont chargees/dechargees ressources par ressources*/
TYPE_MEGAFILE, /*les data sont chargees/dechargees par bloc de ressources*/
TYPE_BIGFILE,
STORAGE_FOR_ALIGNEMENT=SND_ENUM_ALIGNEMENT
} tdeTypeStorage;
/*--------------------------------------------------- RANDOM RESSOURCES*/
/*parametres d'un element d'une liste ACP de references de ressources:*/
struct _tdstRandomElement {
tduRefRes uRes; /*reference sur la ressource associee <20> l<>element*/
SndReal rProb; /*probabilite d'etre choisi*/
SndBool bCanBeChosenTwice; /*if FALSE, element cannot be choosen twice consecutively*/
SNDLST2_M_StaticChildDeclaration(tdstRandomElement*,tdstTypeRandomMem*)
} ;
/*Definition d<>une ressource random en memoire :*/
struct _tdstTypeRandomMem
{
unsigned long ulNbElements; /*nb d<>elements dans la liste d<>aiguillage*/
SndReal rProbNothing; /*probabilite qu'aucun son ne soit choisi*/
SndBool bNothingCanBeChosenTwice; /*if FALSE, "nothing" element cannot be choosen twice consecutively*/
long lLastElementChoosen; /*used only in memory: last eleent choosen SILENCE or any RandomElement*/
long lLastResChoosen; /*used only in memory: last eleent choosen SILENCE or any RandomElement*/
SNDLST2_M_StaticParentDeclaration(tdstRandomElement*)
};
/*Definition d<>une ressource random sur disque :*/
struct _tdstTypeRandomDisk
{
unsigned long ulNbElements; /*nb d<>elements dans la liste d<>aiguillage*/
SndReal rProbNothing; /*probabilite qu'aucun son ne soit choisi*/
SndBool bNothingCanBeChosenTwice; /*if FALSE, "nothing" element cannot be choosen twice consecutively*/
long lLastResChoosenObsolet; /*NOT USED; only kept to avoid disalignment*/
SNDLST2_M_StaticParentDeclaration(tdstRandomElement*) /*not needed, but BNM alignement cannot be changed*/
};
/*----previous THEME (only for compatibility)*/
typedef struct _tdstThemeBridgeOld tdstThemeBridgeOld;
typedef struct _tdstThemePartOld tdstThemePartOld;
typedef struct _tdstTypeThemeOld tdstTypeThemeOld;
typedef tdstThemePartOld* hThemePartOld;
typedef tdstThemeBridgeOld* hThemeBridgeOld;
SNDLST2_M_StaticUseListOf(hThemeBridgeOld);
struct _tdstThemeBridgeOld {
tduRefRes uResTarget;
tduRefRes uRes;
SNDLST2_M_StaticElementDeclaration(hThemeBridgeOld)
};
struct _tdstThemePartOld {
tduRefRes uRes;
SNDLST2_M_StaticChildDeclaration(tdstThemePartOld*,tdstTypeThemeOld*)
/*SNDLST2_M_StaticParentDeclaration(tdstThemeBridge*)*/
SNDLST2_M_StaticAnchorDeclaration(hThemeBridgeOld) hLstThemeBridge;
};
struct _tdstTypeThemeOld {
unsigned long ulStartLoop; /*indice du point de rebouclage*/
unsigned long ulEndLoop; /*indice du dernier point de la boucle la boucle*/
tduRefRes uBridgeIn;
SNDLST2_M_StaticParentDeclaration(tdstThemePartOld*)
};
/*--------------------------------------------------- THEME old2*/
typedef struct _tdstThemeBridgeOld2 tdstThemeBridgeOld2;
typedef struct _tdstThemePartOld2 tdstThemePartOld2;
typedef struct _tdstTypeThemeDiskOld2 tdstTypeThemeDiskOld2;
typedef struct _tdstTypeThemeMemOld2 tdstTypeThemeMemOld2;
typedef tdstThemePartOld2* hThemePartOld2;
typedef tdstThemeBridgeOld2* hThemeBridgeOld2;
SNDLST2_M_StaticUseListOf(hThemeBridgeOld2);
typedef enum _tdeTypeTransitionOld2{
TRANSITION_CROSSFADE_Old2,
TRANSITION_ATENDOFPART_Old2,
TRANSITION_FOR_ALIGNEMENT_Old2=SND_ENUM_ALIGNEMENT
} tdeTypeTransitionOld2;
struct _tdstThemePartOld2 {
tduRefRes uRes;
SndBool_field_decl(bLoopStart); /*TRUE if this part is the begining of a loop*/
SndBool_field_decl(bLoopEnd); /*TRUE if this part is the last part of a loop*/
long lNbLoops; /*if bLoopStart, indicates the number of re-loops (0=played only once,1=2 times...)*/
tdeTypeTransitionOld2 eTransition; /*transition in case of new theme starting*/
SNDLST2_M_StaticChildDeclaration(tdstThemePartOld2*,tdstTypeThemeMemOld2*)
};
struct _tdstTypeThemeDiskOld2 {
unsigned long ulStartLoop; /*indice du point de rebouclage*/
unsigned long ulNbParts; /*nombre total de parts dans la liste*/
SNDLST2_M_StaticParentDeclaration(tdstThemePartOld2*) /*not needed, but BNM alignement cannot be changed*/
};
struct _tdstTypeThemeMemOld2 {
unsigned long ulStartLoop; /*indice du point de rebouclage*/
unsigned long ulNbParts; /*nombre total de parts dans la liste*/
SNDLST2_M_StaticParentDeclaration(tdstThemePartOld2*)
};
/*--------------------------------------------------- THEME*/
typedef enum _tdeTypeTransition{
TRANSITION_CROSSFADE, /*instantaneous transition with cross fade*/
TRANSITION_ATENDOFPART, /*transition at the end of current part*/
TRANSITION_OUTRO, /*transition at the end of current part followed by outro (if any)*/
TRANSITION_FOR_ALIGNEMENT=SND_ENUM_ALIGNEMENT
} tdeTypeTransition;
typedef tdstThemePart* hThemePart;
#define DEFAULT_FADEDURATION M_IntToRealSnd(0)
struct _tdstThemePart {
tduRefRes uRes;
SndBool_field_decl(bLoopStart); /*TRUE if this part is the begining of a loop*/
SndBool_field_decl(bLoopEnd); /*TRUE if this part is the last part of a loop*/
long lNbLoops; /*if bLoopStart, indicates the number of re-loops (0=played only once,1=2 times...)*/
tdeTypeTransition eTransition; /*transition in case of new theme starting*/
SndReal rFadeDuration; /*if DEFAULT, use Theme's fade duration; else, duration in sec*/
SNDLST2_M_StaticChildDeclaration(tdstThemePart*,tdstTypeThemeMem*)
};
struct _tdstThemePartOutro {
tduRefRes uRes;
tdeTypeTransition eTransition; /*transition in case of new theme starting*/
SndReal rFadeDuration; /*if DEFAULT, use Theme's fade duration; else, duration in sec*/
};
#define C_THEME_NO_LOOP -1
#define C_THEME_PART_PLAY_ONCE 0
#define C_THEME_MAINLOOP_INFINITE 0
#define C_THEME_NO_PARTOUTRO -1
struct _tdstTypeThemeDisk {
unsigned long ulStartLoop; /*main loop start (first part of the loop*/
unsigned long ulEndLoopObsolet;/*UNUSED; just keep to avoid disalignment and incompatiblity*/
unsigned long ulNbLoops; /*total number of loop;C_THEME_LOOP_INIFINITE=0 if infinite loop;1=play once;2=play twice...*/
unsigned long ulNbParts; /*total number of part in the list (excluding outro)*/
long lOffsetPartOutro; /*offset of Partoutro in this resource extra data; in bytes; 0 is the location of 1<> part;C_THEME_NO_PARTOUTRO=no partoutro*/
SndReal rFadeDuration; /*if DEFAULT, use default duration (1sec); else, duration in sec*/
SNDLST2_M_StaticParentDeclaration(tdstThemePart*) /*not needed, but BNM alignement cannot be changed*/
};
struct _tdstTypeThemeMem {
unsigned long ulStartLoop; /*main loop start (0=first part, 1=2<> part...)*/
unsigned long ulEndLoopObsolet ;/*UNUSED; just keep to avoid disalignment and incompatiblity*/
unsigned long ulNbParts; /*total number of part in the list (excluding OUTRO)*/
tdstThemePartOutro* pstPartOutro;
SndReal rFadeDuration; /*if DEFAULT, use default fade duration (1sec); else, duration in sec*/
unsigned long ulNbLoops; /*total number of loop;C_THEME_LOOP_INIFINITE=0 if infinite loop;1=play once;2=play twice...*/
SNDLST2_M_StaticParentDeclaration(tdstThemePart*)
};
/*------ previous switch ressources (only for compatbilty)*/
typedef struct _tdstTypeSwitchOld tdstTypeSwitchOld;
struct _tdstTypeSwitchOld
{
SNDLST2_M_StaticParentDeclaration(tdstSwitchElement*)
unsigned long ulNbElements; /*nb d<>elements dans la liste d<>aiguillage*/
long lTypeSwitch; /*type moteur de switch*/
SND_tdxHandleToSoundInfo hDefault; /*indice de l'element par defaut*/
SndBool bDynamic; /*switch remis <20> jour dynamiquement*/
};
/*--------------------------------------------------- SWITCH RESSOURCES*/
/*parametres d'un element d'une liste ACP de references de ressources:*/
struct _tdstSwitchElement {
tduRefRes uRes; /*reference sur la ressource associee <20> l<>element*/
SND_tdxHandleToSoundInfo hIndice; /*indice associe <20> l'element*/
SNDLST2_M_StaticChildDeclaration(tdstSwitchElement*,tdstTypeSwitchMem*)
} ;
/*
// Liste de references sur des ressources:
struct _tdstSwitchList
{
SNDLST2_M_StaticParentDeclaration(tdstSwitchElement*)
};
*/
#define C_SWITCH_NODEFAULT ((SND_tdxHandleToSoundInfo)-1)
/*Definition d<>une ressource switch en memoire :*/
struct _tdstTypeSwitchMem
{
SNDLST2_M_StaticParentDeclaration(tdstSwitchElement*)
unsigned long ulNbElements; /*nb d<>elements dans la liste d<>aiguillage*/
long lTypeSwitch; /*type moteur de switch*/
SND_tdxHandleToSoundInfo hDefault; /*indice de l'element par defaut*/
SndBool_field_decl(bDynamic); /*switch remis <20> jour dynamiquement*/
SndBool_field_decl(bMaintainIfSwitched); /*if TRUE, never stop a launched element, event if switch value change (there'll be only Plays)*/
};
/*Definition d<>une ressource switch sur disque :*/
struct _tdstTypeSwitchDisk
{
SNDLST2_M_StaticParentDeclaration(tdstSwitchElement*) /*not needed, but BNM alignement cannot be changed*/
unsigned long ulNbElements; /*nb d<>elements dans la liste d<>aiguillage*/
long lTypeSwitch; /*type moteur de switch*/
SND_tdxHandleToSoundInfo hDefault; /*indice de l'element par defaut*/
SndBool_field_decl(bDynamic); /*switch remis <20> jour dynamiquement*/
SndBool_field_decl(bMaintainIfSwitched); /*if TRUE, never stop a launched element, event if switch value change (there'll be only Plays)*/
};
/*--------------------------------------------------- RESSOURCES SPLITS*/
/*Definition d<>une ressource split sur disque: */
struct _tdstTypeSplitDisk
{
unsigned long ulNbRanges ; /*nb d<>elements dans la liste d<>aiguillage*/
SndBool bStayActive; /*rester actif si aucune plage active*/
/*char czFileName[13]; // nom du fichier de sequence Id des ressoures*/
} ;
/*Description d'une plage (range) du split*/
struct _tdstRangeSplitDisk {
tduRefRes uRes ; /*ressource associee <20> la plage*/
SndReal rPitchA ; /*pitch de la ressource split correspondant au point A*/
SndReal rPitchB ; /*pitch de la ressource split correspondant au point B*/
SndReal rPitchC ; /*pitch de la ressource split correspondant au point C*/
SndReal rPitchD ; /*pitch de la ressource split correspondant au point D*/
SndReal rCoefPitch ; /*rapport entre pitch effectif de la plage et pitch de la ressource Split*/
unsigned char ucVolume ; /*volume auquel doit etre jouee la ressource entre B et C*/
SNDLST2_M_StaticChildDeclaration(tdstRangeSplitDisk*,tdstRangeSplitListDisk*)
} ;
/*Liste ACP de plages:*/
struct _tdstRangeSplitListDisk{
SNDLST2_M_StaticParentDeclaration(tdstRangeSplitDisk *)
} ;
/*Description d'une plage (range) du split*/
struct _tdstRangeSplitMem {
tduRefRes uRes ; /*ressource associee <20> la plage*/
SndReal rPitchA ; /*pitch de la ressource split correspondant au point A*/
SndReal rPitchB ; /*pitch de la ressource split correspondant au point B*/
SndReal rPitchC ; /*pitch de la ressource split correspondant au point C*/
SndReal rPitchD ; /*pitch de la ressource split correspondant au point D*/
SndReal rCoefPitch ; /*rapport entre pitch effectif de la plage et pitch de la ressource Split*/
unsigned char ucVolume ; /*volume auquel doit etre jouee la ressource entre B et C*/
SNDLST2_M_StaticChildDeclaration(tdstRangeSplitMem*,tdstRangeSplitListMem*)
SndReal rCoefMagAB; /*coef precalcule*/
SndReal rCoefMagCD;
} ;
/*Liste ACP de plages:*/
struct _tdstRangeSplitListMem{
SNDLST2_M_StaticParentDeclaration( tdstRangeSplitMem *)
} ;
/*Definition d<>une ressource switch en memoire :*/
struct _tdstTypeSplitMem
{
unsigned long ulNbRanges; /*nb de plages*/
SndBool bStayActive; /*rester actif si aucune plage active*/
tdstRangeSplitListMem stRangeList; /*liste des plages*/
} ;
/*--------------------------------------------------- SEQUENCES*/
/*parametres d'un element d'une sequence (donnees sur disk)*/
struct _tdstInfoTrackDisk {
unsigned long ulFadeIn; /*fade in sur cet element*/
unsigned long ulFadeOut; /*fade out <20> la fin de l<>element*/
/* unsigned char ucNbLoops; //nombre de repetition de cet element*/
unsigned long ulCrossFade;/*cross-fade avec l <20>element suivant*/
tduRefRes uRes; /*reference sur la ressource associee <20> l<>element*/
} ;
/*parametres d'un element d'une sequence (donnees en mem), element de liste ACP:*/
struct _tdstInfoTrackMem {
SNDLST2_M_StaticChildDeclaration(tdstInfoTrackMem*,tdstInfoTrackList*)
unsigned long ulFadeIn; /*fade in sur cet element*/
unsigned long ulFadeOut; /*fade out <20> la fin de l<>element*/
/* unsigned char ucNbLoops; //nombre de repetition de cet element*/
unsigned long ulCrossFade; /*cross-fade avec l <20>element suivant*/
tduRefRes uRes; /*reference sur la ressource associee <20> l<>element*/
} ;
/* Declaration d'une liste de ressources pour les sequences*/
struct _tdstInfoTrackList
{
/* M_LstParentDeclaration(tdstInfoTrackMem);*/
SNDLST2_M_StaticParentDeclaration(tdstInfoTrackMem*)
};
/*parametres d'une ressource de type sequence (donnee sur disk)*/
struct _tdstTypeSequenceDisk {
SndBool bLoop; /*la sequence boucle-t-elle*/
unsigned long ulStartLoop; /*indice du point de rebouclage*/
unsigned long ulEndLoop; /*nd d<>elements dans la boucle*/
unsigned long ulNbLoops; /*nombre de boucle dans la sequence*/
unsigned long ulNbElements; /*nombre d<>elements constituant la sequence*/
/*char czFileName[13]; // nom du fichier de sequence Id des ressoures*/
} ;
/*parametres d'une ressource de type sequence (donnee en mem)*/
struct _tdstTypeSequenceMem {
SndBool bLoop; /*la sequence boucle-t-elle*/
unsigned long ulStartLoop; /*indice du point de rebouclage*/
unsigned long ulEndLoop; /*nd d<>elements dans la boucle*/
unsigned long ulNbLoops; /*nombre de boucle dans la sequence*/
unsigned long ulNbElements; /*nombre d<>elements constituant la sequence*/
tdstInfoTrackList stResList; /*liste des ressources contenues dans la sequence*/
} ;
/*--------------------------------------------------- BLOCSRESOURCES*/
/*union des descripteurs de ressources sur disk*/
union _tduResDisk {
tdstTypeSampleDisk stSample ;
tdstTypeMidiDisk stMidi ;
tdstTypeCD stCD;
tdstTypeSequenceDisk stSequence ;
tdstTypeSwitchDisk stSwitch ;
tdstTypeSwitchOld stSwitchOld ;/*obsolete*/
tdstTypeSplitDisk stSplit;
tdstTypeThemeDisk stTheme;
tdstTypeRandomDisk stRandom;
tdstTypeThemeOld stThemeOld;/*obsolete*/
tdstTypeThemeDiskOld2 stThemeOld2;/*obsolete*/
} ;
/*description d'une ressource (donnees sur disk)*/
struct _tdstBlockResourceDisk {
tdxId Id; /*id de la ressource*/
tdeTypeResource eType; /*type*/
tdeTypeStorage eStorage; /*storage ???*/
unsigned long ulDataSize; /*taille des donnees utilse (i.e. taille des samples (<taille du WAV)*/
unsigned long ulDataOffset; /*offset des donnees dans le fichier*/
unsigned char ucVolume; /*volume par defaut*/
tduResDisk uRes; /*description de la ressource*/
};
/*union des descripteurs de ressources en memoire*/
union _tduResMem {
tdstTypeSampleMem stSample ;
tdstTypeMidiMem stMidi ;
tdstTypeCD stCD;
tdstTypeSequenceMem stSequence ;
tdstTypeSwitchMem stSwitch ;
tdstTypeSplitMem stSplit;
tdstTypeThemeMem stTheme;
tdstTypeRandomMem stRandom;
} ;
/*description d'une ressource (donnees en memoire)*/
struct _tdstBlockResourceMem {
tdxId Id; /*id de la ressource*/
tdeTypeResource eType; /*type*/
tdeTypeStorage eStorage; /*storage ???*/
unsigned char ucVolume; /*volume par dfaut*/
SndBool bIsLoaded; /*TRUE si en meoire*/
tduResMem uRes ; /*description propre <20> la ressource*/
/* M_LstChildDeclaration(tdstBlockResourceMem,tdstSndPolyResource); //insertion dans la liste ACP*/
SNDLST2_M_StaticChildDeclaration(tdstBlockResourceMem*,tdstSndPolyResource*) /*insertion dans la liste ACP*/
};
/* Description d'une ressource de banque:*/
union _tduBlockResource {
tdstBlockResourceMem stMem;
tdstBlockResourceDisk stDisk;
};
/*liste ACP des ressources */
struct _tdstSndPolyResource {
/* M_LstParentDeclaration(tdstBlockResourceMem);*/
SNDLST2_M_StaticParentDeclaration(tdstBlockResourceMem*)
};
/*parametres d'un element d'une liste ACP de references de ressources:*/
struct _tdstRefRes {
tduRefRes uRes; /*reference sur la ressource associee <20> l<>element*/
SNDLST2_M_StaticChildDeclaration(tdstRefRes*,tdstRefResList*)
} ;
/* Liste de references sur des ressources:*/
struct _tdstRefResList
{
SNDLST2_M_StaticParentDeclaration(tdstRefRes*)
};
#endif /*_SNDRES_H_*/

View File

@@ -0,0 +1,33 @@
#ifndef _SNDRND_H_
#define _SNDRND_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/*
//////////////////////////////////////////////////////
// SNDRND.H - Librairie SOUNDxd version 2.0 //
//////////////////////////////////////////////////////
//////////////////////////////////////////////////////
*/
#undef CPA_EXPORT
/****************************************/
#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
/****************************************/
CPA_EXPORT SndReal SND_fn_rGetRandomSnd(SndReal max);
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SNDRND_H_*/

View File

@@ -0,0 +1,51 @@
#ifndef _SNDRNDOM_H_
#define _SNDRNDOM_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/*
//////////////////////////////////////////////////////////////
// SNDRNDOM.H Version 1.0 //
//////////////////////////////////////////////////////////////
// management of TYPE_RANDOM resources //
//////////////////////////////////////////////////////////////
*/
/****************************************/
#undef CPA_EXPORT
#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
/****************************************/
/*CPA_EXPORT void SND_fn_vConvertResDiskToMemRandom(tdstBlockResourceDisk* disk,tdstBlockResourceMem *mem,void* ptrBegin);*/
/*CPA_EXPORT void SND_fn_vInitRandom(void);
CPA_EXPORT void SND_fn_vDesInitRandom(void);*/
CPA_EXPORT long SND_fn_lPlayRandom(tduRefRes num_res,SoundParam* par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback);
CPA_EXPORT SndBool SND_CALL SND_fn_bSetParamRandom(long voice,SoundParam* par);
CPA_EXPORT SndBool SND_CALL SND_fn_bTestIsPlayingRandom(long voice);
CPA_EXPORT void SND_CALL SND_fn_vStopRandom(long voice);
CPA_EXPORT void SND_CALL SND_fn_vPauseRandom(long voice);
CPA_EXPORT void SND_CALL SND_fn_vResumeRandom(long voice);
CPA_EXPORT void SND_fn_vRemoveCallbackRandom(long voice);
CPA_EXPORT SndBool SND_fn_bLoadResScriptRandom(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
CPA_EXPORT SndBool SND_fn_bLoadResBinaryRandom(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,char *pDataBloc);
CPA_EXPORT void SND_fn_vUnLoadResRandom(tdstBlockResourceMem* mem);
CPA_EXPORT SndReal SND_CALL SND_fn_rGetPosRandom(long voice);
CPA_EXPORT SndReal SND_CALL SND_fn_rGetLengthRandom(long voice);
CPA_EXPORT tduRefRes SND_fn_tduGetLowestResourceRandom(tduRefRes uHighRes,SoundParam* par,SndBool eval);
CPA_EXPORT SndBool SND_CALL SND_fn_bSetResourceStaticVolumeRandom(tdstBlockResourceMem* pstRes,unsigned char ucVolume);
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SNDRANDOM_H_*/

View File

@@ -0,0 +1,32 @@
#ifndef __SNDSEQ__H__
#define __SNDSEQ__H__
/*---------------------------------------*/
/*- Prototypes des fonctions sequenceur -*/
/*---------------------------------------*/
SndBool SND_CALL SND_fn_bSetParamSeq(long voice,SoundParam *par);
SndBool SND_fn_bTestInitSeq(void);
SndBool SND_CALL SND_fn_bTestIsPlayingSeq(long voice);
int SND_fn_iInitSeq(void);
long SND_fn_lPlaySeq(tduRefRes res,SoundParam *par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback,SndBool* valid);
#ifndef NO_ACP_SCRIPT
SndBool SND_fn_bLoadResScriptSeq(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
#endif
#ifndef NO_ACP_LDBIN
SndBool SND_fn_bLoadResBinarySeq(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,char *pDataBloc);
#endif
/*void SND_fn_vConvertResDiskToMemSeq(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,tdstInfoTrackList *ptr);*/
void SND_fn_vDesInitSeq(void);
void SND_CALL SND_fn_vPauseSeq(long voice);
void SND_CALL SND_fn_vResumeSeq(long voice);
void SND_CALL SND_fn_vRemoveCallbackSeq(long voice);
void SND_CALL SND_fn_vStopSeq(long voice);
SndReal SND_CALL SND_fn_rGetPosSeq(long voice);
SndReal SND_CALL SND_fn_rGetLengthSeq(long voice);
SndBool SND_fn_bSetResourceStaticVolumeSeq(tdstBlockResourceMem* pstRes,unsigned char ucVolume);
#endif

View File

@@ -0,0 +1,55 @@
#ifndef _SNDSPACE_H_
#define _SNDSPACE_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/*
//////////////////////////////////////////////////////////////
// SNDSPACE.H //
//////////////////////////////////////////////////////////////
// Module de conversion API3D ->APID2D //
//////////////////////////////////////////////////////////////
*/
#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("-> sndspace : functions pointers defined in SNDDLL.H")
#else
DLL_IMPEXP unsigned char SND_CALL SND_fn_ucDistanceToVolume(SndReal dist);
DLL_IMPEXP unsigned char SND_CALL SND_fn_ucDistanceToVolumeEx(SndReal dist,RollOffParam* rolloff);
DLL_IMPEXP SndReal SND_CALL SND_fn_rDopplerPitch(SndVector *src_pos,SndVector *src_vit,SndVector *mic_pos,SndVector *mic_vit);
DLL_IMPEXP void SND_CALL SND_fn_vSetDopplerFactor(SndReal factor);
DLL_IMPEXP SndReal SND_CALL SND_fn_rGetDopplerFactor(void);
DLL_IMPEXP unsigned char SND_CALL SND_fn_ucPositionToPan(SndVector *src,SndVector *mic,SndVector *mic_nor,SndVector *mic_tan);
DLL_IMPEXP unsigned char SND_CALL SND_fn_ucPositionToDolby(SndVector *src,SndVector *mic,SndVector *mic_nor);
/*DLL_IMPEXP void SND_CALL SND_fn_vSetDistanceForVolume(SndReal* dist_satur,SndReal* dist_fade);*/
DLL_IMPEXP void SND_CALL SND_fn_vSetDefaultRollOff(RollOffParam* rolloff);
DLL_IMPEXP void SND_CALL SND_fn_vGetDefaultRollOff(RollOffParam* rolloff);
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SNDSPACE_H_*/

View File

@@ -0,0 +1,55 @@
#ifndef _SNDSWTCH_H_
#define _SNDSWTCH_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/*
//////////////////////////////////////////////////////////////
// SNDRNDOM.H Version 1.0 //
//////////////////////////////////////////////////////////////
// management of TYPE_Switch resources //
//////////////////////////////////////////////////////////////
*/
/****************************************/
#undef CPA_EXPORT
#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
/****************************************/
/*CPA_EXPORT void SND_fn_vConvertResDiskToMemSwitch(tdstBlockResourceDisk* disk,tdstBlockResourceMem *mem,void* ptrBegin);*/
CPA_EXPORT void SND_fn_vInitSwitch(void);
CPA_EXPORT void SND_fn_vDesInitSwitch(void);
CPA_EXPORT long SND_fn_lPlaySwitch(tduRefRes num_res,SoundParam* par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback);
CPA_EXPORT SndBool SND_CALL SND_fn_bSetParamSwitch(long voice,SoundParam* par);
CPA_EXPORT SndBool SND_CALL SND_fn_bTestIsPlayingSwitch(long voice);
CPA_EXPORT void SND_CALL SND_fn_vStopSwitch(long voice);
CPA_EXPORT void SND_CALL SND_fn_vPauseSwitch(long voice);
CPA_EXPORT void SND_CALL SND_fn_vResumeSwitch(long voice);
CPA_EXPORT void SND_fn_vRemoveCallbackSwitch(long voice);
CPA_EXPORT SndBool SND_fn_bLoadResScriptSwitch(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
CPA_EXPORT SndBool SND_fn_bLoadResBinarySwitch(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,char *pDataBloc);
CPA_EXPORT SndBool SND_fn_bLoadResBinarySwitchOld(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,char *pDataBloc);
CPA_EXPORT void SND_fn_vUnLoadResSwitch(tdstBlockResourceMem* mem);
CPA_EXPORT SndReal SND_CALL SND_fn_rGetPosSwitch(long voice);
CPA_EXPORT SndReal SND_CALL SND_fn_rGetLengthSwitch(long voice);
CPA_EXPORT tduRefRes SND_fn_tduGetLowestResourceSwitch(tduRefRes uHighRes,SoundParam* par,SndBool eval);
CPA_EXPORT SndBool SND_fn_bIsResourceSwitch(tduRefRes res);
CPA_EXPORT long SND_fn_lGetSwitchIndice(long objecttype,long objectid,tduRefRes uRes);
CPA_EXPORT SndBool SND_fn_bSetResourceStaticVolumeSwitch(tdstBlockResourceMem* pstRes,unsigned char ucVolume);
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SNDRANDOM_H_*/

View File

@@ -0,0 +1,59 @@
#ifndef _SNDTHEME_H_
#define _SNDTHEME_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/*
//////////////////////////////////////////////////////////////
// SNDTHEME.H Version 1.0 //
//////////////////////////////////////////////////////////////
// Module d'exploitation des melodies dynamiques //
//////////////////////////////////////////////////////////////
*/
/****************************************/
#undef CPA_EXPORT
#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
/****************************************/
/*#include "sndtype.h"*/
/*CPA_EXPORT void SND_fn_vConvertResDiskToMemTheme(tdstBlockResourceDisk* disk,tdstBlockResourceMem *mem,void* ptrBegin);*/
CPA_EXPORT void SND_fn_vInitTheme(void);
CPA_EXPORT void SND_fn_vDesInitTheme(void);
CPA_EXPORT long SND_fn_lPlayTheme(long canal,tduRefRes num_res,SoundParam* par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback,SndBool* active);
CPA_EXPORT SndBool SND_CALL SND_fn_bSetParamTheme(long canal,SoundParam* par);
CPA_EXPORT SndBool SND_CALL SND_fn_bTestIsPlayingTheme(long canal);
CPA_EXPORT SndBool SND_CALL SND_fn_bAnyPlayingTheme();
CPA_EXPORT void SND_CALL SND_fn_vStopTheme(long canal);
CPA_EXPORT void SND_CALL SND_fn_vPauseTheme(long canal);
CPA_EXPORT void SND_CALL SND_fn_vResumeTheme(long canal);
CPA_EXPORT void SND_fn_vRemoveCallbackTheme(long canal);
CPA_EXPORT SndBool SND_fn_bLoadResScriptTheme(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
CPA_EXPORT SndBool SND_fn_bLoadResBinaryTheme(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,char *pDataBloc);
CPA_EXPORT void SND_fn_vUnLoadResTheme(tdstBlockResourceMem* mem);
CPA_EXPORT SndReal SND_CALL SND_fn_rGetPosTheme(long voice);
CPA_EXPORT SndReal SND_CALL SND_fn_rGetLengthTheme(long voice);
CPA_EXPORT SndBool SND_fn_bGetThemePosition(tduRefRes *current_theme,long* id_part,long* id_loop);
CPA_EXPORT SndBool SND_fn_bGetAskedTheme(tduRefRes *asked_theme,SndBool *transiting);
CPA_EXPORT SndBool SND_fn_bSetResourceStaticVolumeTheme(tdstBlockResourceMem* pstRes,unsigned char ucVolume);
#define THEMEPOSITION_BRIDGEIN -1
#define THEMEPOSITION_NOBRIDGE -2
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SNDTHEME_H_*/

View File

@@ -0,0 +1,62 @@
#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_*/

View File

@@ -0,0 +1,50 @@
#ifndef _SNDVECT_H_
#define _SNDVECT_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/*
//////////////////////////////////////////////////////
// SNDVECT.H - Librairie SOUNDxd version 2.0 //
//////////////////////////////////////////////////////
// Definitions des types et fonctions de gestion //
// des vecteurs spatiaux //
//////////////////////////////////////////////////////
*/
#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("-> sndvect : functions pointers defined in SNDDLL.H")
#else
DLL_IMPEXP SndReal SND_CALL SND_fn_rNormeVectorSnd(SndVector *v);
DLL_IMPEXP SndReal SND_CALL SND_fn_rPseudoNormeVectorSnd(SndVector *v);
DLL_IMPEXP SndReal SND_CALL SND_fn_rScalaireVectorSnd(SndVector *v1,SndVector *v2);
DLL_IMPEXP SndReal SND_CALL SND_fn_rPseudoScalaireNormeVectorSnd(SndVector *v1,SndVector *v2);
DLL_IMPEXP void SND_CALL SND_fn_vProduitVectorSnd(SndVector *v1,SndVector *v2,SndVector *v);
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SNDVECT_H_*/

View File

@@ -0,0 +1,129 @@
#ifndef _SNDVIRT_H_
#define _SNDVIRT_H_
#include "sndlst2.h"
/*handle to functions*/
typedef long (SND_CALL *td_pfn_lPlaySxd)(tduRefRes,SoundParam*,long,SND_td_pfn_vSoundCallback,long);
typedef void (SND_CALL *td_pfn_vPauseSxd)(long);
typedef void (SND_CALL *td_pfn_vResumeSxd)(long);
typedef SndBool (SND_CALL *td_pfn_bSetParamSxd)(long,SoundParam*);
typedef void (SND_CALL *td_pfn_vStopSxd)(long);
typedef SndReal (SND_CALL *td_pfn_rGetPosSxd)(long);
typedef SndReal (SND_CALL *td_pfn_rGetLengthSxd)(long);
typedef void (SND_CALL *td_pfn_vRemoveCallbackSxd)(long);
typedef SndBool (SND_CALL *td_pfn_bTestIsPlayingSxd)(long);
/*typedefs*/
SNDLST2_M_DynamicUseListOf(SND_tdhVirtualModule);
typedef struct _virtual_voice *p_virtual_voice;
SNDLST2_M_DynamicUseListOf(p_virtual_voice);
typedef struct _audible_voice *p_audible_voice;
SNDLST2_M_DynamicUseListOf(p_audible_voice);
typedef struct _dead_voice *p_dead_voice;
SNDLST2_M_DynamicUseListOf(p_dead_voice);
typedef struct _virtual_voice_list *p_virtual_voice_list;
typedef struct _virtual_voice{
long lVoice; /*retour du PlaySxdWave;C_PLAY_FAILED si pas de Stop necessaire*/
SndReal rNorme; /*norme permettant le classement des voies (+/- distance au micro)*/
long lPrio; /*priority level*/
long lInstance; /*instace (+/- ordre d'arrivee)*/
SND_td_pfn_vSoundCallback pfnCallback;/*fonction de callback haut-niveau (passee <20> SND_fn_lPlayVirt)*/
long lParamCallback;
tduRefRes tduRes; /*ressource virtuellement associee <20> l voie (passee <20> SND_fn_lPlayVirt)*/
long lSizeParam; /*taille du suivant*/
SoundParam* pstParam; /*copy du dernier SetParam*/
SndBool_field_decl(bHardCallback); /*TRUE if Callback called by hard-leve, FALSE if called by SNDVIRT*/
SndBool_field_decl(bUsed); /*FALSE si aucune reference n'a encore ete rendue publique = destrction immediate toleree*/
SndBool_field_decl(bPaused); /*TRUE si en pause*/
/*---*/
p_audible_voice audible; /*!=NULL si voie audible*/
p_dead_voice dead; /*!=NULL si voie audible*/
SNDLST2_M_DynamicElementDeclaration(p_virtual_voice)
} virtual_voice;
typedef struct _virtual_voice_list{
SNDLST2_M_DynamicAnchorDeclaration(p_virtual_voice) pList;
} virtual_voice_list;
/*liste des audibles*/
typedef struct _audible_voice{
p_virtual_voice voice;
SndBool bCheck;
SNDLST2_M_DynamicElementDeclaration(p_audible_voice)
} audible_voice;
typedef struct _audible_voice_list{
SNDLST2_M_DynamicAnchorDeclaration(p_audible_voice) pList;
} audible_voice_list;
/*liste des voies tuees (<28> desallouee ou <20> reutiliser pour une nouvelle voie*/
typedef struct _dead_voice{
p_virtual_voice voice;
SNDLST2_M_DynamicElementDeclaration(p_dead_voice)
} dead_voice;
typedef struct _dead_voice_list{
SNDLST2_M_DynamicAnchorDeclaration(p_dead_voice) pList;
} dead_voice_list;
typedef struct _ptr_virtualfunction
{
td_pfn_lPlaySxd pfn_lPlaySxd;
td_pfn_vStopSxd pfn_vStopSxd;
td_pfn_bSetParamSxd pfn_bSetParamSxd;
td_pfn_vPauseSxd pfn_vPauseSxd;
td_pfn_vResumeSxd pfn_vResumeSxd;
td_pfn_rGetPosSxd pfn_rGetPosSxd;
td_pfn_rGetLengthSxd pfn_rGetLengthSxd;
td_pfn_vRemoveCallbackSxd pfn_vRemoveCallbackSxd;
td_pfn_bTestIsPlayingSxd pfn_bTestIsPlayingSxd;
} ptr_virtualfunction;
/*liste des module Virtual*/
typedef struct _virtual_module{
/*liste des voies virtuelles = id retournes par PlayVitual*/
virtual_voice_list virtual_voices;
/*liste des voies physique = id retournes par PlaySnd*/
audible_voice_list audible_voices;
/*liste des voies desallouees*/
dead_voice_list dead_voices;
long g_lInstance;
long g_lNbSxdAudible;
ptr_virtualfunction stPtrFunctions;
SNDLST2_M_DynamicElementDeclaration(SND_tdhVirtualModule)
} virtual_module;
typedef struct _virtual_module_list{
SNDLST2_M_DynamicAnchorDeclaration(SND_tdhVirtualModule) pList;
} virtual_module_list;
/*functions*/
long SND_fn_lPlaySxdVirtual(SND_tdhVirtualModule module,tduRefRes res,SoundParam *par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback);
void SND_fn_vRemoveCallbackSxdVirtual(SND_tdhVirtualModule module,long voice);
SndBool SND_fn_bSetParamSxdVirtual(SND_tdhVirtualModule module,long voice,SoundParam *par);
SndBool SND_fn_bTestIsPlayingSxdVirtual(SND_tdhVirtualModule module,long voice);
void SND_fn_vStopSxdVirtual(SND_tdhVirtualModule module,long voice);
void SND_fn_vPauseSxdVirtual(SND_tdhVirtualModule module,long voice);
void SND_fn_vResumeSxdVirtual(SND_tdhVirtualModule module,long voice);
void SND_fn_vSynchroSxdVirtual(SND_tdhVirtualModule module);
SndReal SND_fn_rGetPosSxdVirtual(SND_tdhVirtualModule module,long voice);
SndReal SND_fn_rGetLengthSxdVirtual(SND_tdhVirtualModule module,long voice);
SND_tdhVirtualModule SND_fn_lInitSxdVirtual(long nb_audible,ptr_virtualfunction* functions);
SndBool SND_fn_bTestInitSxdVirtual(SND_tdhVirtualModule module);
void SND_fn_vDesInitSxdVirtual(SND_tdhVirtualModule module);
void SND_fn_vChangeNbVoiceWishedSxdVirtual(SND_tdhVirtualModule module,long nb_audible);
#endif /*_SNDVIRT_H_*/

View File

@@ -0,0 +1,101 @@
#ifndef _SNDWAVE_H_
#define _SNDWAVE_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/*
//////////////////////////////////////////////////////////////
// SNDWAVE.H //
//////////////////////////////////////////////////////////////
// Module d'exploitation de samples simples //
//////////////////////////////////////////////////////////////
*/
CPA_EXPORT long SND_fn_lPlaySample(tduRefRes res,SampleParam *par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback);
CPA_EXPORT void SND_fn_vRemoveCallbackSample(long voice);
CPA_EXPORT SndBool SND_fn_bSetParamSample(long voice,SampleParam *par);
CPA_EXPORT SndBool SND_fn_bTestIsPlayingSample(long voice);
CPA_EXPORT void SND_fn_vStopSample(long voice);
CPA_EXPORT void SND_fn_vPauseSample(long voice);
CPA_EXPORT void SND_fn_vResumeSample(long voice);
CPA_EXPORT SndReal SND_fn_rGetPosSample(long voice);
CPA_EXPORT SndReal SND_fn_rGetLengthSample(long voice);
CPA_EXPORT void SND_fn_vSetSoundVolumeSample(unsigned char vol);
CPA_EXPORT unsigned char SND_fn_ucGetSoundVolumeSample(void);
CPA_EXPORT void SND_fn_vSetStereoSample(SndBool active);
CPA_EXPORT SndBool SND_fn_bGetStereoSample(void);
CPA_EXPORT void SND_fn_vSetReverseSample(SndBool active);
CPA_EXPORT SndBool SND_fn_bGetReverseSample(void);
CPA_EXPORT int SND_fn_iInitSample(SND_tdstInitStruct *pInitStruct);
CPA_EXPORT SndBool SND_fn_bTestInitSample(void);
CPA_EXPORT void SND_fn_vDesInitSample(void);
CPA_EXPORT int SND_fn_iInitBnkSample(long num);
CPA_EXPORT SndBool SND_fn_bTestInitBnkSample(long num);
CPA_EXPORT void SND_fn_vDesInitBnkSample(long num);
CPA_EXPORT void SND_fn_vDesInitAllBnkSample(void);
CPA_EXPORT void SND_fn_vSetEffectSample(long num);
CPA_EXPORT tduRefRes SND_fn_tdGetResForVoiceSample(long voice);
/*---gestion des buffers clients*/
CPA_EXPORT long SND_fn_lCreateNewBufferSample(unsigned long nb_samples,unsigned short uwResolution,unsigned short uwNbChannels,unsigned long ulFreq,SampleParam* par,td_pfn_vRefreshBufferClient callback,long user_id);
CPA_EXPORT void SND_fn_vSetParamBufferSample(long id_buffer,SampleParam *par);
CPA_EXPORT void SND_fn_vDeleteBufferSample(long id_buffer);
CPA_EXPORT void SND_fn_vPauseBufferSample(long id_buffer);
CPA_EXPORT void SND_fn_vResumeBufferSample(long id_buffer);
CPA_EXPORT void* SND_fn_pvGetPtrBufferSample(long id_buffer);
CPA_EXPORT SndReal SND_fn_rGetPosBufferSample(long id_buffer);
CPA_EXPORT long SND_fn_lCreateNewBufferExSample(SND_tdstFormat* pformat,SND_tdstCallback* pCallback,SampleParam* par,long user_id);
CPA_EXPORT long SND_fn_lGetPosBufferExSample(long id_buffer);
CPA_EXPORT long SND_fn_lPushBufferExSample(long id_buffer,SND_tdstStackBuffer* pStack);
CPA_EXPORT void SND_fn_vConvertResDiskToMemSample(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,void* ptrBegin);
CPA_EXPORT SndBool SND_fn_bLoadResScriptSample(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
CPA_EXPORT SndBool SND_fn_bLoadResBinarySample(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,char *pDataBloc);
/*CPA_EXPORT void SND_fn_vLoadResFromDiskSample(tdstBlockResourceDisk* disk,tdstBlockResourceMem* mem);*/
CPA_EXPORT void SND_fn_vUnLoadResSample(tdstBlockResourceMem* mem);
CPA_EXPORT SndBool SND_fn_bIsResLoadedSample(tdstBlockResourceMem *mem);
/*CPA_EXPORT void SND_fn_vSetResUnloadedSample(tdstBlockResourceMem *pResMem);*/
/*---themes*/
CPA_EXPORT long SND_fn_lPlayTransitionSample(tduRefRes FirstRes,tduRefRes NextRes,SND_td_pfn_vSoundCallback transition_callback,long param_callback,SampleParam* par);
CPA_EXPORT SndBool SND_fn_bSetParamTransitionSample(long voice,SampleParam* par);
CPA_EXPORT SndBool SND_fn_bSetNextTransitionSample(long voice,tduRefRes new_res);
CPA_EXPORT SndBool SND_fn_bDoTransitionWithFadeSample(long voice,tduRefRes new_res);
CPA_EXPORT SndBool SND_fn_bDoTransitionWithFadeSample2( long voice, tduRefRes new_res, SndReal rDuration );
CPA_EXPORT void SND_fn_vStopTransitionSample(long voice);
CPA_EXPORT void SND_fn_vPauseTransitionSample(long voice);
CPA_EXPORT void SND_fn_vResumeTransitionSample(long voice);
/*relache-reprise a chaud des drives*/
CPA_EXPORT void SND_fn_vReleaseDriverSample(void);
CPA_EXPORT void SND_fn_vRestoreDriverSample(void);
CPA_EXPORT void SND_fn_vForceReleaseDriverSample(void);
CPA_EXPORT void SND_fn_vForceRestoreDriverSample(void);
void SND_fn_vGetTargetLabelSample(char* name,int nb_char);
void SND_fn_vSetupTargetSample(void);
SndBool SND_fn_bCanSetupTargetSample(void);
void SND_fn_vSynchroSample();
void SND_fn_vSetSoundVolumeSample(unsigned char vol);
unsigned char SND_fn_ucGetSoundVolumeSample(void);
long SND_fn_lGetNbVoiceOptimumSample();
long SND_fn_lGetNbVoiceWishedSample();
void SND_fn_vSetNbVoiceWishedSample(long nb);
SndBool SND_fn_bIsResourceLoopingSample(tduRefRes res);
SndBool SND_fn_bSetResourceStaticVolumeSample(tdstBlockResourceMem* pstRes,unsigned char ucVolume);
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SNDXD_H_*/

View File

@@ -0,0 +1,148 @@
#ifndef _SNDXD_H_
#define _SNDXD_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/*
//////////////////////////////////////////////////////////////
// SNDXD.H //
//////////////////////////////////////////////////////////////
// Module d'exploitation des samples 3D //
//////////////////////////////////////////////////////////////
*/
#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
/*#include "sndtype.h"*/
#if defined(_DLL_COMPILATION_MODE) && !defined(DLLWAV_MODULE)
#pragma message("-> sndxd : functions pointers defined in SNDDLL.H")
#else
DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lPlaySxd(tduRefRes res,SoundParam *par,long prio,SND_td_pfn_vSoundCallback fn_callback,long par_callback);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vRemoveCallbackSxd(long voice);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bSetParamSxd(long voice,SoundParam *par);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bTestIsPlayingSxd(long voice);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vStopSxd(long voice);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vPauseSxd(long voice);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vResumeSxd(long voice);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bIsResourceLoopingSxd(tduRefRes res);
DLL_IMPEXP CPA_EXPORT SndReal SND_CALL SND_fn_rGetPosSxd(long voice);
DLL_IMPEXP CPA_EXPORT SndReal SND_CALL SND_fn_rGetLengthSxd(long voice);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSetSoundVolumeSxd(unsigned char vol);
DLL_IMPEXP CPA_EXPORT unsigned char SND_CALL SND_fn_ucGetSoundVolumeSxd();
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSetStereoSxd(SndBool active);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bGetStereoSxd(void);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSetReverseStereoSxd(SndBool active);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bGetReverseStereoSxd(void);
DLL_IMPEXP CPA_EXPORT int SND_CALL SND_fn_iInitSxd(SND_tdstInitStruct *pInitStruct);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bTestInitSxd(void);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vDesInitSxd(void);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSetDopplerFactorSxd(SndReal factor);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSetEffectSxd(long num);
DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lCreateMicroSxd(MicroParam* par);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSetMicroParamSxd(long sxdId,MicroParam* par);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vDestroyMicroSxd(long sxdId);
/* DLL_IMPEXP CPA_EXPORT tduRefRes SND_fn_tdGetResForVoiceSxd(long voice);*/
/*gestion de buffers*/
DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lCreateNewBufferSxd(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_vSetParamBufferSxd(long id_buffer,SoundParam *par);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vDeleteBufferSxd(long id_buffer);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vPauseBufferSxd(long id_buffer);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vResumeBufferSxd(long id_buffer);
DLL_IMPEXP CPA_EXPORT void* SND_CALL SND_fn_pvGetPtrBufferSxd(long id_buffer);
DLL_IMPEXP CPA_EXPORT SndReal SND_CALL SND_fn_rGetPosBufferSxd(long id_buffer);
DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lCreateNewBufferExSxd(SND_tdstFormat* pformat,SND_tdstCallback* pCallback,SoundParam* par,long user_id);
DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lGetPosBufferExSxd(long id_buffer);
DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lPushBufferExSxd(long id_buffer,SND_tdstStackBuffer* pStack);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vConvertResDiskToMemSxd(tdstBlockResourceDisk *disk
,tdstBlockResourceMem *mem
,void* ptrBegin);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bLoadResScriptSxd(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bLoadResBinarySxd(tdstBlockResourceDisk *disk,tdstBlockResourceMem *mem,char *pDataBloc);
/* DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vLoadResFromDiskSxd(tdstBlockResourceDisk* disk,tdstBlockResourceMem* mem);*/
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vUnLoadResSxd(tdstBlockResourceMem* mem);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bIsResLoadedSxd(tdstBlockResourceMem *mem);
/* DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSetResUnloadedSxd(tdstBlockResourceMem *pResMem);*/
/*---themes*/
DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lPlayTransitionExSxd(tduRefRes FirstRes,tduRefRes NextRes,SND_td_pfn_vSoundCallback transition_callback,long param_callback,SoundParam* par);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bSetParamTransitionSxd(long voice,SoundParam *par);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bSetNextTransitionSxd(long voice,tduRefRes new_res);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bDoTransitionWithFadeSxd(long voice,tduRefRes new_res);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bDoTransitionWithFadeSxd2( long voice, tduRefRes new_res, SndReal rDuration );
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vStopTransitionSxd(long voice);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vPauseTransitionSxd(long voice);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vResumeTransitionSxd(long voice);
#ifndef NO_ACP_LDBIN
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bCanFreeDataSample(void);
#endif
/*--relache-reprise a chaud des drives*/
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vReleaseDriverSxd(void);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vRestoreDriverSxd(void);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vForceReleaseDriverSxd(void);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vForceRestoreDriverSxd(void);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vGetTargetLabelSxd(char* name,int nb_char);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSetupTargetSxd();
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bCanSetupTargetSxd();
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSynchroSxd();
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vParam3Dto2D(SoundParam *par3D,SampleParam *par2D);
DLL_IMPEXP CPA_EXPORT SndReal SND_CALL SND_fn_rGetNormeSxd(SoundParam *par3D);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSetDefaultRollOffSxd(RollOffParam* rolloff);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bCheckVersionResourceSxd(tdstBlockResourceDisk* disk);
/*fonctions obsoletes: <20> garder pour compatibilite DLL*/
DLL_IMPEXP CPA_EXPORT int SND_CALL SND_fn_iInitBnkSxd(long num);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bTestInitBnkSxd(long num);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vDesInitBnkSxd(long num);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vDesInitAllBnkSxd(void);
DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lPlayTransitionSxd(tduRefRes FirstRes,tduRefRes NextRes,SND_td_pfn_vSoundCallback transition_callback,SoundParam* par);
DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lGetNbVoiceOptimumSxd();
DLL_IMPEXP CPA_EXPORT long SND_CALL SND_fn_lGetNbVoiceWishedSxd();
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSetNbVoiceWishedSxd(tdeTypeZip ezip,long nb);
DLL_IMPEXP CPA_EXPORT tdeTypeZip SND_CALL SND_fn_eGetMainFormatSxd();
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bSetResourceStaticVolumeSxd(tdstBlockResourceMem* pstRes,unsigned char ucVolume);
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SNDXD_H_*/