eaxman.h 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. /*
  2. */
  3. #ifndef __EAXMANH
  4. #define __EAXMANH
  5. #define COM_NO_WINDOWS_H
  6. #include <objbase.h>
  7. #include "eax3.h"
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif // __cplusplus
  11. //#define CLSID_EAXMANAGER CLSID_EAX20_Manager
  12. //#define IID_IEaxManager IID_EAX20_Manager
  13. #define EM_MAX_NAME 32
  14. #define EMFLAG_IDDEFAULT (-1)
  15. #define EMFLAG_IDNONE (-2)
  16. #define EMFLAG_LOCKPOSITION 1
  17. #define EMFLAG_LOADFROMMEMORY 2
  18. #define EMFLAG_NODIFFRACTION 4
  19. typedef struct _EMPOINT {
  20. float fX;
  21. float fY;
  22. float fZ;
  23. } EMPOINT;
  24. typedef EMPOINT FAR *LPEMPOINT;
  25. typedef struct _LISTENERATTRIBUTES {
  26. float fDistanceFactor;
  27. float fRolloffFactor;
  28. float fDopplerFactor;
  29. } LISTENERATTRIBUTES;
  30. typedef LISTENERATTRIBUTES FAR *LPLISTENERATTRIBUTES;
  31. typedef struct _SOURCEATTRIBUTES {
  32. EAXBUFFERPROPERTIES eaxAttributes;
  33. unsigned long ulInsideConeAngle;
  34. unsigned long ulOutsideConeAngle;
  35. long lConeOutsideVolume;
  36. float fConeXdir;
  37. float fConeYdir;
  38. float fConeZdir;
  39. float fMinDistance;
  40. float fMaxDistance;
  41. long lDupCount;
  42. long lPriority;
  43. } SOURCEATTRIBUTES;
  44. typedef SOURCEATTRIBUTES FAR *LPSOURCEATTRIBUTES;
  45. typedef struct _MATERIALATTRIBUTES {
  46. long lLevel;
  47. float fLFRatio;
  48. float fRoomRatio;
  49. DWORD dwFlags;
  50. } MATERIALATTRIBUTES;
  51. typedef MATERIALATTRIBUTES FAR *LPMATERIALATTRIBUTES;
  52. #define EMMATERIAL_OBSTRUCTS 1
  53. #define EMMATERIAL_OCCLUDES 3
  54. typedef struct _DIFFRACTIONBOX {
  55. long lSubspaceID;
  56. EMPOINT empMin;
  57. EMPOINT empMax;
  58. } DIFFRACTIONBOX;
  59. typedef DIFFRACTIONBOX FAR *LPDIFFRACTIONBOX;
  60. // {7CE4D6E6-562F-11d3-8812-005004062F83}
  61. DEFINE_GUID(CLSID_EAXMANAGER, 0x60b721a1, 0xf7c8, 0x11d2, 0xa0, 0x2e, 0x0, 0x50, 0x4, 0x6, 0x18, 0xb8);
  62. #ifdef __cplusplus
  63. struct IEaxManager;
  64. #endif // __cplusplus
  65. typedef struct IEaxManager *LPEAXMANAGER;
  66. // {7CE4D6E8-562F-11d3-8812-005004062F83}
  67. DEFINE_GUID(IID_IEaxManager, 0x60b721a2, 0xf7c8, 0x11d2, 0xa0, 0x2e, 0x0, 0x50, 0x4, 0x6, 0x18, 0xb8);
  68. #undef INTERFACE
  69. #define INTERFACE IEaxManager
  70. extern HRESULT __stdcall EaxManagerCreate(LPEAXMANAGER*);
  71. typedef HRESULT (__stdcall *LPEAXMANAGERCREATE)(LPEAXMANAGER*);
  72. DECLARE_INTERFACE_(IEaxManager, IUnknown)
  73. {
  74. // IUnknown methods
  75. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  76. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  77. STDMETHOD_(ULONG,Release) (THIS) PURE;
  78. STDMETHOD(GetDataSetSize) (THIS_ unsigned long*, DWORD) PURE;
  79. STDMETHOD(LoadDataSet) (THIS_ char*, DWORD) PURE;
  80. STDMETHOD(FreeDataSet) (THIS_ DWORD) PURE;
  81. STDMETHOD(GetListenerAttributes) (THIS_ LPLISTENERATTRIBUTES) PURE;
  82. STDMETHOD(GetSourceID) (THIS_ char*, long*) PURE;
  83. STDMETHOD(GetSourceAttributes) (THIS_ long, LPSOURCEATTRIBUTES) PURE;
  84. STDMETHOD(GetSourceNumInstances) (THIS_ long, long*) PURE;
  85. STDMETHOD(GetSourceInstancePos) (THIS_ long, long, LPEMPOINT) PURE;
  86. STDMETHOD(GetEnvironmentID) (THIS_ char*, long*) PURE;
  87. STDMETHOD(GetEnvironmentAttributes) (THIS_ long, LPEAXLISTENERPROPERTIES) PURE;
  88. STDMETHOD(GetMaterialID) (THIS_ char*, long*) PURE;
  89. STDMETHOD(GetMaterialAttributes) (THIS_ long, LPMATERIALATTRIBUTES) PURE;
  90. STDMETHOD(GetGeometrySetID) (THIS_ char*, long*) PURE;
  91. STDMETHOD(GetListenerDynamicAttributes) (THIS_ long, LPEMPOINT, long*, DWORD) PURE;
  92. STDMETHOD(GetSourceDynamicAttributes) (THIS_ long, LPEMPOINT, long*, float*, long*, float*, float*, LPEMPOINT, DWORD) PURE;
  93. // STDMETHOD(GetSubSpaceID) (THIS_ long, LPEMPOINT, long *) PURE;
  94. STDMETHOD(GetEnvironmentName) (THIS_ long, char *szString, long lStrlen) PURE;
  95. };
  96. #if !defined(__cplusplus) || defined(CINTERFACE)
  97. #define IEaxManager_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  98. #define IEaxManager_AddRef(p) (p)->lpVtbl->AddRef(p)
  99. #define IEaxManager_Release(p) (p)->lpVtbl->Release(p)
  100. #define IEaxManager_GetDataSetSize(p,a,b) (p)->lpVtbl->GetDataSetSize(p,a,b)
  101. #define IEaxManager_LoadDataSet(p,a,b) (p)->lpVtbl->LoadDataSet(p,a,b)
  102. #define IEaxManager_FreeDataSet(p,a) (p)->lpVtbl->FreeDataSet(p,a)
  103. #define IEaxManager_GetListenerAttributes(p,a) (p)->lpVtbl->GetListenerAttributes(p,a)
  104. #define IEaxManager_GetSourceID(p,a,b) (p)->lpVtbl->GetSourceID(p,a,b)
  105. #define IEaxManager_GetSourceAttributes(p,a,b) (p)->lpVtbl->GetSourceAttributes(p,a,b)
  106. #define IEaxManager_GetSourceNumInstances(p,a,b) (p)->lpVtbl->GetSourceNumInstances(p,a,b)
  107. #define IEaxManager_GetSourceInstancePos(p,a,b,c) (p)->lpVtbl->GetSourceInstancePos(p,a,b,c)
  108. #define IEaxManager_GetEnvironmentID(p,a,b) (p)->lpVtbl->GetEnvironmentID(p,a,b)
  109. #define IEaxManager_GetEnvironmentAttributes(p,a,b) (p)->lpVtbl->GetEnvironmentAttributes(p,a,b)
  110. #define IEaxManager_GetMaterialID(p,a,b) (p)->lpVtbl->GetMaterialID(p,a,b)
  111. #define IEaxManager_GetMaterialAttributes(p,a,b) (p)->lpVtbl->GetMaterialAttributes(p,a,b)
  112. #define IEaxManager_GetGeometrySetID(p,a,b) (p)->lpVtbl->GetGeometrySetID(p,a,b)
  113. #define IEaxManager_GetListenerDynamicAttributes(p,a,b,c,d) (p)->lpVtbl->GetListenerDynamicAttributes(p,a,b,c,d)
  114. #define IEaxManager_GetSourceDynamicAttributes(p,a,b,c,d,e,f,g,h,i) (p)->lpVtbl->GetSourceDynamicAttributes(p,a,b,c,d,e,f,g,h,i)
  115. //#define IEaxManager_GetSubSpaceID(p,a,b,c) (p)->lpVtbl->GetSubSpaceID(p,a,b,c)
  116. #define IEaxManager_GetEnvironmentName(p,a,b,c) (p)->lpVtbl->GetEnvironmentName(p,a,b,c)
  117. #else
  118. #define IEaxManager_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  119. #define IEaxManager_AddRef(p) (p)->AddRef()
  120. #define IEaxManager_Release(p) (p)->Release()
  121. #define IEaxManager_GetDataSetSize(p,a,b) (p)->GetDataSetSize(a,b)
  122. #define IEaxManager_LoadDataSet(p,a,b) (p)->LoadDataSet(a,b)
  123. #define IEaxManager_FreeDataSet(p,a) (p)->FreeDataSet(a)
  124. #define IEaxManager_GetListenerAttributes(p,a) (p)->GetListenerAttributes(a)
  125. #define IEaxManager_GetSourceID(p,a,b) (p)->GetSourceID(a,b)
  126. #define IEaxManager_GetSourceAttributes(p,a,b) (p)->GetSourceAttributes(a,b)
  127. #define IEaxManager_GetSourceNumInstances(p,a,b) (p)->GetSourceNumInstances(a,b)
  128. #define IEaxManager_GetSourceInstancePos(p,a,b,c) (p)->GetSourceInstancePos(a,b,c)
  129. #define IEaxManager_GetEnvironmentID(p,a,b) (p)->GetEnvironmentID(a,b)
  130. #define IEaxManager_GetEnvironmentAttributes(p,a,b) (p)->GetEnvironmentAttributes(a,b)
  131. #define IEaxManager_GetMaterialID(p,a,b) (p)->GetMaterialID(a,b)
  132. #define IEaxManager_GetMaterialAttributes(p,a,b) (p)->GetMaterialAttributes(a,b)
  133. #define IEaxManager_GetGeometrySetID(p,a,b) (p)->GetGeometrySetID(a,b)
  134. #define IEaxManager_GetListenerDynamicAttributes(p,a,b,c,d) (p)->GetListenerDynamicAttributes(a,b,c,d)
  135. #define IEaxManager_GetSourceDynamicAttributes(p,a,b,c,d,e,f,g,h,i) (p)->GetSourceDynamicAttributes(a,b,c,d,e,f,g,h,i)
  136. //#define IEaxManager_GetSubSpaceID(p,a,b,c) (p)->GetSubSpaceID(a,b,c)
  137. #define IEaxManager_GetEnvironmentName(p,a,b,c) (p)->GetEnvironmentName(a,b,c)
  138. #endif
  139. #define EM_OK 0
  140. #define EM_INVALIDID MAKE_HRESULT(1, FACILITY_ITF, 1)
  141. #define EM_IDNOTFOUND MAKE_HRESULT(1, FACILITY_ITF, 2)
  142. #define EM_FILENOTFOUND MAKE_HRESULT(1, FACILITY_ITF, 3)
  143. #define EM_FILEINVALID MAKE_HRESULT(1, FACILITY_ITF, 4)
  144. #define EM_VERSIONINVALID MAKE_HRESULT(1, FACILITY_ITF, 5)
  145. #define EM_INSTANCENOTFOUND MAKE_HRESULT(1, FACILITY_ITF, 6)
  146. #ifdef __cplusplus
  147. };
  148. #endif // __cplusplus
  149. #endif