Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IA3D.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------
2 *
3 * ia3d.h
4 *
5 *---------------------------------------------------------------------
6 *
7 * $Id: ia3d.h%v 1.1 1996/09/02 10:50:35 mike Exp mike $
8 *
9 *---------------------------------------------------------------------
10 *
11 * ia3d header file. It's the part the outside world needs to see.
12 *
13 *---------------------------------------------------------------------
14 *
15 * AUREAL SEMICONDUCTOR, INC. PROPRIETARY AND CONFIDENTIAL
16 * Copyright (c) 1996 Aureal Semiconductor, Inc. - All rights
17 * reserved.
18 *
19 *---------------------------------------------------------------------
20 */
21 
22 
23 #ifndef _IA3D_H_
24 #define _IA3D_H_
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 
31  // A3d Class ID! {D8F1EEE0-F634-11cf-8700-00A0245D918B}
32  DEFINE_GUID(CLSID_A3d,
33  0xd8f1eee0, 0xf634, 0x11cf, 0x87, 0x0, 0x0, 0xa0, 0x24, 0x5d, 0x91, 0x8b);
34 
35  // A3d Interface ID! {D8F1EEE1-F634-11cf-8700-00A0245D918B}
36  DEFINE_GUID(IID_IA3d,
37  0xd8f1eee1, 0xf634, 0x11cf, 0x87, 0x0, 0x0, 0xa0, 0x24, 0x5d, 0x91, 0x8b);
38 
39 
40  // Bits for manipulating output modes
41 
42  // Values for bOutputMode
43 #define OUTPUT_MODE_STEREO 0x00000001
44 #define OUTPUT_MODE_QUAD 0x00000002
45 
46  // Values for FrontXtalkMode and bRearXtalkMode
47 #define OUTPUT_HEADPHONES 0x00000001 // headphones
48 #define OUTPUT_SPEAKERS_WIDE 0x00000002
49 #define OUTPUT_SPEAKERS_NARROW 0x00000003
50 
51  // Values for Resource Management Mode
52 #define A3D_RESOURCE_MODE_OFF 0x00000000
53 #define A3D_RESOURCE_MODE_NOTIFY 0x00000001
54 #define A3D_RESOURCE_MODE_DYNAMIC 0x00000002
55 
56  // Declare the IA3d Interface. It's not very complex at all.
57 
58 #undef INTERFACE
59 #define INTERFACE IA3d
60 
61  typedef struct IA3d *LPIA3D;
62 
63  DECLARE_INTERFACE_(IA3d, IUnknown)
64  {
65  // IUnknown
66  STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
67  STDMETHOD_(ULONG,AddRef) (THIS) PURE;
68  STDMETHOD_(ULONG,Release) (THIS) PURE;
69 
70  // IA3d
71  STDMETHOD(SetOutputMode)(THIS_ DWORD dwFrontXtalkMode, DWORD dwBackXtalkMode, DWORD dwQuadMode) PURE;
72  STDMETHOD(GetOutputMode)(THIS_ DWORD *lpdwFrontXtalkMode, DWORD *lpdwBackXtalkMode, DWORD *lpdwQuadMode) PURE;
73 
74  STDMETHOD(SetResourceManagerMode) (THIS_ DWORD ) PURE;
75  STDMETHOD(GetResourceManagerMode) (THIS_ DWORD *) PURE;
76 
77  STDMETHOD(SetHFAbsorbFactor)(THIS_ FLOAT ) PURE;
78  STDMETHOD(GetHFAbsorbFactor)(THIS_ FLOAT *) PURE;
79 
80  };
81 
82 
83 
84 
85  // The library function that gets things going. It returns an interface
86  // pointer to DirectSound.
87 
88 #define A3D_OK 1 // A3dCreate returns this upon detection of A3D enabled hardware.
89 
90  _declspec (dllexport) HRESULT WINAPI
91  A3dCreate(GUID * lpGUID, LPDIRECTSOUND * ppDS, IUnknown FAR *pUnkOuter );
92 
93  // Usefull Macros for C folks.
94 
95 #if !defined(__cplusplus) || defined(CINTERFACE)
96 #define IA3d_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
97 #define IA3d_AddRef(p) (p)->lpVtbl->AddRef(p)
98 #define IA3d_Release(p) (p)->lpVtbl->Release(p)
99 #define IA3d_SetOutputMode(p,a,b,c) (p)->lpVtbl->SetOutputMode(p,a,b,c)
100 #define IA3d_GetOutputMode(p,a,b,c) (p)->lpVtbl->GetOutputMode(p,a,b,c)
101 #define IA3d_SetResourceManagerMode(p,a) (p)->lpVtbl->SetResourceManagerMode(p,a)
102 #define IA3d_GetResourceManagerMode(p,a) (p)->lpVtbl->GetResourceManagerMode(p,a)
103 #define IA3d_SetHFAbsorbFactor(p,a) (p)->lpVtbl->SetHFAbsorbFactor(p,a)
104 #define IA3d_GetHFAbsorbFactor(p,a) (p)->lpVtbl->GetHFAbsorbFactor(p,a)
105 
106 
107 #else
108 #define IA3d_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
109 #define IA3d_AddRef(p) (p)->AddRef()
110 #define IA3d_Release(p) (p)->Release()
111 #define IA3d_SetOutputMode(p,a,b,c) (p)->SetOutputMode(a,b,c)
112 #define IA3d_GetOutputMode(p,a,b,c) (p)->GetOutputMode(a,b,c)
113 #define IA3d_SetResourceManagerMode(p,a) (p)->SetResourceManagerMode(a)
114 #define IA3d_GetResourceManagerMode(p,a) (p)->GetResourceManagerMode(a)
115 #define IA3d_SetHFAbsorbFactor(p,a) (p)->SetHFAbsorbFactor(a)
116 #define IA3d_GetHFAbsorbFactor(p,a) (p)->GetHFAbsorbFactor(a)
117 
118 #endif
119 
120 
121 
122 #ifdef __cplusplus
123 };
124 #endif
125 
126 
127 
128 #endif // _IA3D_H_