summaryrefslogtreecommitdiffhomepage
path: root/StarsEx/IA3D.H
blob: 9e4e31974bc4303bf44902a01fc57a0837766808 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
/*---------------------------------------------------------------------
*
* ia3d.h
*
*---------------------------------------------------------------------
*
* $Id: ia3d.h%v 1.1 1996/09/02 10:50:35 mike Exp mike $
*
*---------------------------------------------------------------------
*
* ia3d header file.  It's the part the outside world needs to see.
*
*---------------------------------------------------------------------
*
* AUREAL SEMICONDUCTOR, INC. PROPRIETARY AND CONFIDENTIAL
* Copyright (c) 1996 Aureal Semiconductor, Inc. - All rights 
* reserved. 
*
*---------------------------------------------------------------------
*/


#ifndef _IA3D_H_
#define _IA3D_H_

#ifdef __cplusplus
extern "C" {
#endif


	// A3d Class ID! {D8F1EEE0-F634-11cf-8700-00A0245D918B}
	DEFINE_GUID(CLSID_A3d, 
	0xd8f1eee0, 0xf634, 0x11cf, 0x87, 0x0, 0x0, 0xa0, 0x24, 0x5d, 0x91, 0x8b);

	// A3d Interface ID! {D8F1EEE1-F634-11cf-8700-00A0245D918B}
	DEFINE_GUID(IID_IA3d,
	0xd8f1eee1, 0xf634, 0x11cf, 0x87, 0x0, 0x0, 0xa0, 0x24, 0x5d, 0x91, 0x8b);


	// Bits for manipulating output modes

	// Values for bOutputMode
#define OUTPUT_MODE_STEREO	0x00000001
#define OUTPUT_MODE_QUAD	0x00000002

	// Values for FrontXtalkMode and bRearXtalkMode
#define OUTPUT_HEADPHONES		0x00000001    // headphones
#define OUTPUT_SPEAKERS_WIDE    0x00000002
#define OUTPUT_SPEAKERS_NARROW	0x00000003

	// Values for Resource Management Mode
#define A3D_RESOURCE_MODE_OFF		     0x00000000
#define A3D_RESOURCE_MODE_NOTIFY	     0x00000001
#define A3D_RESOURCE_MODE_DYNAMIC     	 0x00000002

	// Declare the IA3d Interface.  It's not very complex at all.

#undef INTERFACE
#define INTERFACE IA3d

	typedef struct IA3d *LPIA3D;

	DECLARE_INTERFACE_(IA3d, IUnknown)
	{
		// IUnknown 
		STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
		STDMETHOD_(ULONG,AddRef)  (THIS) PURE;
		STDMETHOD_(ULONG,Release) (THIS) PURE;

		// IA3d
		STDMETHOD(SetOutputMode)(THIS_ DWORD    dwFrontXtalkMode, DWORD    dwBackXtalkMode, DWORD    dwQuadMode) PURE;
		STDMETHOD(GetOutputMode)(THIS_ DWORD *lpdwFrontXtalkMode, DWORD *lpdwBackXtalkMode, DWORD *lpdwQuadMode) PURE;

		STDMETHOD(SetResourceManagerMode) (THIS_ DWORD  ) PURE;
		STDMETHOD(GetResourceManagerMode) (THIS_ DWORD *) PURE;

		STDMETHOD(SetHFAbsorbFactor)(THIS_ FLOAT  ) PURE;
		STDMETHOD(GetHFAbsorbFactor)(THIS_ FLOAT *) PURE;

	};




	// The library function that gets things going.  It returns an interface
	// pointer to DirectSound.

#define A3D_OK			1	// A3dCreate returns this upon detection of A3D enabled hardware.

	_declspec (dllexport) HRESULT WINAPI
	A3dCreate(GUID * lpGUID, LPDIRECTSOUND * ppDS, IUnknown FAR *pUnkOuter );

	// Usefull Macros for C folks.

#if !defined(__cplusplus) || defined(CINTERFACE)
#define IA3d_QueryInterface(p,a,b)			(p)->lpVtbl->QueryInterface(p,a,b)
#define IA3d_AddRef(p)						(p)->lpVtbl->AddRef(p)
#define IA3d_Release(p)						(p)->lpVtbl->Release(p)
#define IA3d_SetOutputMode(p,a,b,c)			(p)->lpVtbl->SetOutputMode(p,a,b,c)
#define IA3d_GetOutputMode(p,a,b,c)			(p)->lpVtbl->GetOutputMode(p,a,b,c)
#define IA3d_SetResourceManagerMode(p,a)	(p)->lpVtbl->SetResourceManagerMode(p,a)
#define IA3d_GetResourceManagerMode(p,a)	(p)->lpVtbl->GetResourceManagerMode(p,a)
#define IA3d_SetHFAbsorbFactor(p,a)			(p)->lpVtbl->SetHFAbsorbFactor(p,a)
#define IA3d_GetHFAbsorbFactor(p,a)			(p)->lpVtbl->GetHFAbsorbFactor(p,a)

	
#else										
#define IA3d_QueryInterface(p,a,b)			(p)->QueryInterface(a,b)
#define IA3d_AddRef(p)						(p)->AddRef()
#define IA3d_Release(p)						(p)->Release()
#define IA3d_SetOutputMode(p,a,b,c)			(p)->SetOutputMode(a,b,c)
#define IA3d_GetOutputMode(p,a,b,c)			(p)->GetOutputMode(a,b,c)
#define IA3d_SetResourceManagerMode(p,a)	(p)->SetResourceManagerMode(a)
#define IA3d_GetResourceManagerMode(p,a)	(p)->GetResourceManagerMode(a)
#define IA3d_SetHFAbsorbFactor(p,a)			(p)->SetHFAbsorbFactor(a)
#define IA3d_GetHFAbsorbFactor(p,a)			(p)->GetHFAbsorbFactor(a)

#endif



#ifdef __cplusplus
};
#endif



#endif // _IA3D_H_