/*--------------------------------------------------------
FILE     imdxTool.h

ROLE:
     definition of the COM interface for the performance tool (to modify tempo, volume...)

LAST MODIFICATIONS:
	  - J.Vibert - 21/01/98 - fading
      - J.Vibert - 21/01/98 - SetMainVolValue method
      - D.Dumont - created, tempo modified by tool
--------------------------------------------------------*/

#ifndef __IMDXTOOL_H__
#define __IMDXTOOL_H__

#include <dmusici.h>
#include <objbase.h>

#ifdef INIT
#include <initguid.h>
#endif /*INIT */


// {673DEB61-8A6B-11d1-B197-006097BAFA72}
DEFINE_GUID(IID_IMDXTool, 
0x673deb61, 0x8a6b, 0x11d1, 0xb1, 0x97, 0x0, 0x60, 0x97, 0xba, 0xfa, 0x72);



typedef struct _IMDXTool
{
struct IMDXTool_Vtbl *lpVtbl;
} IMDXTool;

//We then go on to define the virtual function table, like so: 
  
struct IMDXTool_Vtbl 
{ 
/*///// The IUnknown methods that all COM objects must support /////*/ 
HRESULT (_stdcall *pfnQueryInterface)(IMDXTool *pThis, REFIID pIID, void **ppv ); 
long (_stdcall *pfnAddRef)(IMDXTool *pThis ); 
long (_stdcall *pfnRelease)(IMDXTool *pThis ); 
  
/*///// The methods of the IDirectMusicTool interface /////*/ 

HRESULT (_stdcall *pfnInit)(IMDXTool *pThis ,IDirectMusicGraph* pGraph) ;
HRESULT (_stdcall *pfnGetMsgDeliveryType)(IMDXTool *pThis ,DWORD* pdwDeliveryType ) ;
HRESULT (_stdcall *pfnGetMediaTypeArraySize)(IMDXTool *pThis ,DWORD* pdwNumElements ) ;
HRESULT (_stdcall *pfnGetMediaTypes)(IMDXTool *pThis ,DWORD** padwMediaTypes, DWORD dwNumElements) ;
HRESULT (_stdcall *pfnProcessPMsg)(IMDXTool *pThis ,IDirectMusicPerformance* pPerf, DMUS_PMSG* pDMUS_PMSG) ;
HRESULT (_stdcall *pfnFlush)(IMDXTool *pThis ,IDirectMusicPerformance* pPerf, DMUS_PMSG* pDMUS_PMSG, REFERENCE_TIME rt) ;

void	(_stdcall *SetUserTempo)(IMDXTool *pIm,WORD wUserTempo);
void	(_stdcall *SetMuteFlag)(IMDXTool *pIm,WORD wMuteFlag);
void	(_stdcall *SetVolFlag)(IMDXTool *pIm,WORD wVolFlag);
void	(_stdcall *SetVolValue)(IMDXTool *pIm,int iChannel,char newValue);
void	(_stdcall *SetMainVolValue)(IMDXTool *pIm,char newValue);
char	(_stdcall *GetMainVolValue)(IMDXTool *pIm);
char	(_stdcall *GetFadeCoeff)(IMDXTool *pIm);
void    (_stdcall *DoFade)(IMDXTool *pIm, IDirectMusicPerformance* pPerf, char cBeginVolValue, char cEndVolValue, DWORD dwTimeFade, void *pCallback);
void    (_stdcall *EndFade)(IMDXTool *pIm);
char	(_stdcall *IsFading)(IMDXTool *pIm); //boolean

};




#endif