//	Module SNDWAVE - Version exclusive DirectX2D (X2)

#undef DLL_IMPEXP
#define DLL_IMPEXP __declspec(dllexport)

//sections et options du SND_CPA.INI
#define DX2D_SECTION "Directx2D Options"
#define DX2D_NBVOICES_KEY "Nb Voices"
#define DX2D_GUID_KEY "GUID for " 

//typedef publiques
typedef struct {
	SndBool bGuidNULL;
	GUID Guid;
	char description[128];
	char module[128];
	DSCAPS	caps;
} stGUIDAvailable;
typedef stGUIDAvailable* pstGUIDAvailable;

//typedef moteur privés
typedef struct _tdstSampleMemoryDX2D        tdstSampleMemoryDX2D;
typedef union _tduDataSampleDX2D tduDataSampleDX2D;
typedef struct _tdstTypeSampleMemDX2D tdstTypeSampleMemDX2D;
typedef union _tduRefResDX2D tduRefResDX2D;
typedef struct _tdstBlockResourceMemDX2D tdstBlockResourceMemDX2D;
typedef union _tduResMemDX2D tduResMemDX2D;

union _tduRefResDX2D {
        tdxId                       Id;
        tdstBlockResourceMemDX2D    *pstPtr;
} ;

//paramètre d'une ressource sample en mémoire
struct _tdstSampleMemoryDX2D {
        LPDIRECTSOUNDBUFFER     lpBufferAttack;
        LPDIRECTSOUNDBUFFER     lpBufferLoop;
        int                     iSizeAttack;
}  ;

//union de la description du sample
union _tduDataSampleDX2D{
                tdstSampleMemoryDX2D        stMem ;
                tdstSampleStreaming     stStream ;
} ;

//paramètres d'une ressource sample (données en mem)
struct _tdstTypeSampleMemDX2D {
        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
        tduDataSampleDX2D   uData;          //description du sample
        unsigned long       ulInc0 ;        //période en echantillons
        unsigned long       ulFreq;         //période en echantillons
        unsigned short      uwResolution;   //nb de bits (8 ou 16)
        unsigned short      uwNbChannels;   //nb de canaux(mono, stéreo ...)
        tdeTypeZip          eZip;
} ;

union _tduResMemDX2D {
                tdstTypeSampleMemDX2D   stSample ;
                tdstTypeMidiMem         stMidi ;
                tdstTypeCD              stCD;
                tdstTypeSequenceMem     stSequence ;
                tdstTypeSwitchMem       stSwitch ;
                tdstTypeSplitMem        stSplit;
                tdstTypeThemeMem        stTheme;
} ;

//description d'une ressource (données en mémoire)
struct _tdstBlockResourceMemDX2D {
        tdxId           Id;                     //id de la ressource
        tdeTypeResource eType;          //type
        tdeTypeStorage  eStorage;               //storage ???
        unsigned char   ucVolume;       //volume par dfaut
        SndBool         bIsLoaded ;     //TRUE si en méoire
        tduResMemDX2D   uRes ;          //description propre à la ressource
//        M_LstChildDeclaration(tdstBlockResourceMem,tdstSndPolyResource);        //insertion dans la liste ACP
        SNDLST2_M_StaticChildDeclaration(tdstBlockResourceMemDX2D*,tdstSndPolyResource*)        //insertion dans la liste ACP
};

DLL_IMPEXP int	SND_CALL SND_fn_iGetGUIDList(pstGUIDAvailable lpGuidDescrption,int size);
DLL_IMPEXP void SND_CALL SND_fn_vGetWantedGUID(char* GUID_wanted,int size);
DLL_IMPEXP void SND_CALL SND_fn_vGetCurrentGUID(char* description,int size);
DLL_IMPEXP void SND_CALL SND_fn_vChangeWantedGUID(char* wanted,char* selected,int size);
DLL_IMPEXP void SND_CALL SND_fn_vChangeCurrentGUID(char* wanted,char* selected,int size);

