source: golgotha/src/i4/sound/dsound/ia3d.h @ 608

Last change on this file since 608 was 80, checked in by Sam Hocevar, 15 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
  • Property svn:keywords set to Id
File size: 5.0 KB
RevLine 
[80]1/*---------------------------------------------------------------------
2 *
3 * ia3d.h
4 *
5 *---------------------------------------------------------------------
6 *
7 * $Id: ia3d.h 80 2008-03-04 23:32:10Z sam $
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 *
24 * $Log: ia3d.h,v $
25 * Revision 1.1  1997/05/29 20:02:59  trey
26 * aureal header file
27 *
28 *
29 * 9     1/17/97 12:51p Ag
30 * took out setdefaulthfabsorb
31 *
32 * 8     1/15/97 6:01p Ag
33 * added hf absorb functions
34 *  plus C interface defines
35 *
36 *
37 * 7     1/15/97 5:55p Ag
38 * added hf absorb functions
39 *
40 *
41 * 6     1/14/97 5:55p Pradek
42 * Swapped values for OUTPUT_SPEAKER_WIDE and OUTPUT_SPEAKER_NARROW
43 *
44 * 5     1/13/97 2:04p Pradek
45 * Updated 'C' interface defines
46 * Added A3D_OK value.
47 *
48 * 4     1/05/97 5:34p Pradek
49 * Added defines for Resource Management Modes
50 *
51 * 3     12/30/96 2:36p Mike
52 * Changed set/get output.
53 * Added Resource Manager API template
54 *
55 * 2     11/12/96 12:19a Pradek
56 *
57 * 1     10/30/96 4:11p Pradek
58 *
59 * 1     10/30/96 4:10p Pradek
60 *
61 * 1     10/28/96 1:35a Pradek
62 * Shared include files
63 * Revision 1.1  1996/09/02  10:50:35  mike
64 * Initial revision
65 *
66 *
67 */
68
69#ifndef _IA3D_H_
70#define _IA3D_H_
71
72
73
74#ifdef __cplusplus
75extern "C" {
76#endif
77
78
79#define DEFINE_A3D_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
80        EXTERN_C const GUID CDECL name \
81                = { l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }
82
83// A3d Class ID! {D8F1EEE0-F634-11cf-8700-00A0245D918B}
84DEFINE_A3D_GUID(CLSID_A3d,
850xd8f1eee0, 0xf634, 0x11cf, 0x87, 0x0, 0x0, 0xa0, 0x24, 0x5d, 0x91, 0x8b);
86
87// A3d Interface ID! {D8F1EEE1-F634-11cf-8700-00A0245D918B}
88DEFINE_A3D_GUID(IID_IA3d,
890xd8f1eee1, 0xf634, 0x11cf, 0x87, 0x0, 0x0, 0xa0, 0x24, 0x5d, 0x91, 0x8b);
90
91
92// Bits for manipulating output modes
93
94// Values for bOutputMode
95#define OUTPUT_MODE_STEREO      0x00000001
96#define OUTPUT_MODE_QUAD        0x00000002
97
98// Values for FrontXtalkMode and bRearXtalkMode
99#define OUTPUT_HEADPHONES               0x00000001    // headphones
100#define OUTPUT_SPEAKERS_WIDE    0x00000002
101#define OUTPUT_SPEAKERS_NARROW  0x00000003
102
103// Values for Resource Management Mode
104#define A3D_RESOURCE_MODE_OFF           0x00000000
105#define A3D_RESOURCE_MODE_NOTIFY        0x00000001
106#define A3D_RESOURCE_MODE_DYNAMIC       0x00000002
107
108// Declare the IA3d Interface.  It's not very complex at all.
109
110#undef INTERFACE
111#define INTERFACE IA3d
112
113typedef struct IA3d *LPIA3D;
114
115DECLARE_INTERFACE_(IA3d, IUnknown)
116{
117    // IUnknown
118    STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
119    STDMETHOD_(ULONG,AddRef)  (THIS) PURE;
120    STDMETHOD_(ULONG,Release) (THIS) PURE;
121
122    // IA3d
123    STDMETHOD(SetOutputMode)(THIS_ DWORD    dwFrontXtalkMode, DWORD    dwBackXtalkMode, DWORD    dwQuadMode) PURE;
124    STDMETHOD(GetOutputMode)(THIS_ DWORD *lpdwFrontXtalkMode, DWORD *lpdwBackXtalkMode, DWORD *lpdwQuadMode) PURE;
125
126        STDMETHOD(SetResourceManagerMode) (THIS_ DWORD  ) PURE;
127        STDMETHOD(GetResourceManagerMode) (THIS_ DWORD *) PURE;
128
129        STDMETHOD(SetHFAbsorbFactor)(THIS_ FLOAT  ) PURE;
130    STDMETHOD(GetHFAbsorbFactor)(THIS_ FLOAT *) PURE;
131
132};
133
134
135
136
137// The library function that gets things going.  It returns an interface
138// pointer to DirectSound.
139
140#define A3D_OK                  1       // A3dCreate returns this upon detection of A3D enabled hardware.
141
142_declspec (dllexport) HRESULT WINAPI
143A3dCreate(const GUID * lpGUID, LPDIRECTSOUND * ppDS, IUnknown FAR *pUnkOuter );
144
145
146// Usefull Macros for C folks.
147
148#if !defined(__cplusplus) || defined(CINTERFACE)
149#define IA3d_QueryInterface(p,a,b)                      (p)->lpVtbl->QueryInterface(p,a,b)
150#define IA3d_AddRef(p)                                          (p)->lpVtbl->AddRef(p)
151#define IA3d_Release(p)                                         (p)->lpVtbl->Release(p)
152#define IA3d_SetOutputMode(p,a,b,c)                     (p)->lpVtbl->SetOutputMode(p,a,b,c)
153#define IA3d_GetOutputMode(p,a,b,c)                     (p)->lpVtbl->GetOutputMode(p,a,b,c)
154#define IA3d_SetResourceManagerMode(p,a)        (p)->lpVtbl->SetResourceManagerMode(p,a)
155#define IA3d_GetResourceManagerMode(p,a)        (p)->lpVtbl->GetResourceManagerMode(p,a)
156#define IA3d_SetHFAbsorbFactor(p,a)                     (p)->lpVtbl->SetHFAbsorbFactor(p,a)
157#define IA3d_GetHFAbsorbFactor(p,a)                     (p)->lpVtbl->GetHFAbsorbFactor(p,a)
158
159   
160#else                                                                           
161#define IA3d_QueryInterface(p,a,b)                      (p)->QueryInterface(a,b)
162#define IA3d_AddRef(p)                                          (p)->AddRef()
163#define IA3d_Release(p)                                         (p)->Release()
164#define IA3d_SetOutputMode(p,a,b,c)                     (p)->SetOutputMode(a,b,c)
165#define IA3d_GetOutputMode(p,a,b,c)                     (p)->GetOutputMode(a,b,c)
166#define IA3d_SetResourceManagerMode(p,a)        (p)->lpVtbl->SetResourceManagerMode(a)
167#define IA3d_GetResourceManagerMode(p,a)        (p)->lpVtbl->GetResourceManagerMode(a)
168#define IA3d_SetHFAbsorbFactor(p,a)                     (p)->lpVtbl->SetHFAbsorbFactor(a)
169#define IA3d_GetHFAbsorbFactor(p,a)                     (p)->lpVtbl->GetHFAbsorbFactor(a)
170
171#endif
172
173
174
175#ifdef __cplusplus
176};
177#endif
178
179                                 
180
181#endif // _IA3D_H_
Note: See TracBrowser for help on using the repository browser.