mf/session: Fix computing fastest and slowest presentation rates.
[wine.git] / include / xact.h
blob03a354e69a969380c04cf5cf71072b6ee58515f0
1 /*
2 * Copyright (C) 2020 Vijay Kiran Kamuju
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef _XACT_H_
20 #define _XACT_H_
22 #include <windows.h>
23 #include <objbase.h>
24 #include <float.h>
25 #include <limits.h>
26 #include <xact2wb.h>
28 #if XACT3_VER == 0x0210
29 DEFINE_GUID(CLSID_XACTEngine, 0x65d822a4, 0x4799, 0x42c6, 0x9b, 0x18, 0xd2, 0x6c, 0xf6, 0x6d, 0xd3, 0x20);
30 DEFINE_GUID(CLSID_XACTAuditionEngine, 0x03dd980d, 0xeca1, 0x4de0, 0x98, 0x22, 0xeb, 0x22, 0x44, 0xa0, 0xe2, 0x75);
31 DEFINE_GUID(CLSID_XACTDebugEngine, 0x871dc2b3, 0xc947, 0x4aed, 0xbf, 0xad, 0xa1, 0x79, 0x18, 0xfb, 0xcf, 0x05);
32 DEFINE_GUID(IID_IXACTEngine, 0x5ac3994b, 0xac77, 0x4c40, 0xb9, 0xfd, 0x7d, 0x5a, 0xfb, 0xe9, 0x64, 0xc5);
33 #elif XACT3_VER == 0x0209
34 DEFINE_GUID(CLSID_XACTEngine, 0x343e68e6, 0x8f82, 0x4a8d, 0xa2, 0xda, 0x6e, 0x9a, 0x94, 0x4b, 0x37, 0x8c);
35 DEFINE_GUID(CLSID_XACTAuditionEngine, 0xcedde475, 0x50b5, 0x47ef, 0x91, 0xa7, 0x3b, 0x49, 0xa0, 0xe8, 0xe5, 0x88);
36 DEFINE_GUID(CLSID_XACTDebugEngine, 0x3cbb606b, 0x06f1, 0x473e, 0x9d, 0xd5, 0x0e, 0x4a, 0x3b, 0x47, 0x14, 0x13);
37 DEFINE_GUID(IID_IXACTEngine, 0x893ff2e4, 0x8d03, 0x4d5f, 0xb0, 0xaa, 0x36, 0x3a, 0x9c, 0xbb, 0xf4, 0x37);
38 #elif XACT3_VER == 0x0208
39 DEFINE_GUID(CLSID_XACTEngine, 0x77c56bf4, 0x18a1, 0x42b0, 0x88, 0xaf, 0x50, 0x72, 0xce, 0x81, 0x49, 0x49);
40 DEFINE_GUID(CLSID_XACTAuditionEngine, 0x46f7c2b1, 0x774b, 0x419e, 0x9a, 0xbe, 0xa4, 0x8f, 0xb0, 0x42, 0xa3, 0xb0);
41 DEFINE_GUID(CLSID_XACTDebugEngine, 0x307473ef, 0xc3d4, 0x4d97, 0x9b, 0x9c, 0xce, 0x23, 0x92, 0x85, 0x21, 0xdb);
42 DEFINE_GUID(IID_IXACTEngine, 0xf1fff4f0, 0xec75, 0x45cb, 0x98, 0x6d, 0xe6, 0x37, 0xf7, 0xe7, 0xcd, 0xd5);
43 #elif XACT3_VER == 0x0207
44 DEFINE_GUID(CLSID_XACTEngine, 0xcd0d66ec, 0x8057, 0x43f5, 0xac, 0xbd, 0x66, 0xdf, 0xb3, 0x6f, 0xd7, 0x8c);
45 DEFINE_GUID(CLSID_XACTAuditionEngine, 0x9b94bf7a, 0xce0f, 0x4c68, 0x8b, 0x5e, 0xd0, 0x62, 0xcb, 0x37, 0x30, 0xc3);
46 DEFINE_GUID(CLSID_XACTDebugEngine, 0x1bd54a4b, 0xa1dc, 0x4e4c, 0x92, 0xa2, 0x73, 0xed, 0x33, 0x55, 0x21, 0x48);
47 DEFINE_GUID(IID_IXACTEngine, 0xc2f0af68, 0x1f6d, 0x40ed, 0x96, 0x4f, 0x26, 0x25, 0x68, 0x42, 0xed, 0xc4);
48 #elif XACT3_VER == 0x0206
49 DEFINE_GUID(CLSID_XACTEngine, 0x3a2495ce, 0x31d0, 0x435b, 0x8c, 0xcf, 0xe9, 0xf0, 0x84, 0x3f, 0xd9, 0x60);
50 DEFINE_GUID(CLSID_XACTAuditionEngine, 0xa17e147b, 0xc168, 0x45d4, 0x95, 0xf6, 0xb2, 0x15, 0x15, 0xec, 0x1e, 0x66);
51 DEFINE_GUID(CLSID_XACTDebugEngine, 0xfe7e064f, 0xf9ea, 0x49ee, 0xba, 0x64, 0x84, 0x5e, 0x42, 0x35, 0x59, 0xc5);
52 DEFINE_GUID(IID_IXACTEngine, 0x5a5d41d0, 0x2161, 0x4a39, 0xaa, 0xdc, 0x11, 0x49, 0x30, 0x14, 0x7e, 0xaa);
53 #elif XACT3_VER == 0x0205
54 DEFINE_GUID(CLSID_XACTEngine, 0x54b68bc7, 0x3a45, 0x416b, 0xa8, 0xc9, 0x19, 0xbf, 0x19, 0xec, 0x1d, 0xf5);
55 DEFINE_GUID(CLSID_XACTAuditionEngine, 0xaeaf4809, 0x6e94, 0x4663, 0x8f, 0xf8, 0x1b, 0x4c, 0x7c, 0x0e, 0x6d, 0xfd);
56 DEFINE_GUID(CLSID_XACTDebugEngine, 0x290d0a8c, 0xa131, 0x4cf4, 0x8b, 0xbd, 0x37, 0xd0, 0x2b, 0x59, 0xcc, 0x4a);
57 DEFINE_GUID(IID_IXACTEngine, 0xf9df94ad, 0x6960, 0x4307, 0xbf, 0xad, 0x4e, 0x97, 0xac, 0x18, 0x94, 0xc6);
58 #elif XACT3_VER == 0x0204
59 DEFINE_GUID(CLSID_XACTEngine, 0xbc3e0fc6, 0x2e0d, 0x4c45, 0xbc, 0x61, 0xd9, 0xc3, 0x28, 0x31, 0x9b, 0xd8);
60 DEFINE_GUID(CLSID_XACTAuditionEngine, 0x30bad9f7, 0x0018, 0x49e9, 0xbf, 0x94, 0x4a, 0xe8, 0x9c, 0xc5, 0x4d, 0x64);
61 DEFINE_GUID(CLSID_XACTDebugEngine, 0x74ee14d5, 0xca1d, 0x44ac, 0x8b, 0xd3, 0xfa, 0x94, 0xf7, 0x34, 0x6e, 0x24);
62 DEFINE_GUID(IID_IXACTEngine, 0x43a0d4a8, 0x9387, 0x4e06, 0x94, 0x33, 0x65, 0x41, 0x8f, 0xe7, 0x0a, 0x67);
63 #elif XACT3_VER == 0x0203
64 DEFINE_GUID(CLSID_XACTEngine, 0x1138472b, 0xd187, 0x44e9, 0x81, 0xf2, 0xae, 0x1b, 0x0e, 0x77, 0x85, 0xf1);
65 DEFINE_GUID(CLSID_XACTAuditionEngine, 0x07fb2b69, 0x0ee4, 0x4eee, 0xbb, 0xe8, 0xc7, 0x62, 0x89, 0x79, 0x87, 0x17);
66 DEFINE_GUID(CLSID_XACTDebugEngine, 0x9ebf716a, 0x4c83, 0x4db0, 0x9a, 0x5a, 0xc7, 0x27, 0xde, 0x92, 0xb2, 0x73);
67 DEFINE_GUID(IID_IXACTEngine, 0xb28629f1, 0x0cb0, 0x47bc, 0xb4, 0x6a, 0xa2, 0xa1, 0xa7, 0x29, 0x6f, 0x02);
68 #elif XACT3_VER == 0x0202
69 DEFINE_GUID(CLSID_XACTEngine, 0xc60fae90, 0x4183, 0x4a3f, 0xb2, 0xf7, 0xac, 0x1d, 0xc4, 0x9b, 0x0e, 0x5c);
70 DEFINE_GUID(CLSID_XACTAuditionEngine, 0x4cb2112c, 0x62e9, 0x43fc, 0x8d, 0x9d, 0x6c, 0xa0, 0x8c, 0xed, 0x45, 0xf1);
71 DEFINE_GUID(CLSID_XACTDebugEngine, 0x3ec76fdc, 0xb626, 0x43fb, 0xbe, 0x22, 0x9b, 0x43, 0x1d, 0x06, 0xb9, 0x68);
72 DEFINE_GUID(IID_IXACTEngine, 0x9c454686, 0xb827, 0x4e5e, 0x88, 0xd9, 0x5b, 0x99, 0xd6, 0x6b, 0x02, 0x2f);
73 #elif XACT3_VER == 0x0201
74 DEFINE_GUID(CLSID_XACTEngine, 0x1f1b577e, 0x5e5a, 0x4e8a, 0xba, 0x73, 0xc6, 0x57, 0xea, 0x8e, 0x85, 0x98);
75 DEFINE_GUID(CLSID_XACTAuditionEngine, 0xfcecc8be, 0xb09a, 0x48cb, 0x92, 0x08, 0x95, 0xa7, 0xed, 0x45, 0x82, 0xa6);
76 DEFINE_GUID(CLSID_XACTDebugEngine, 0x2b4a46bb, 0xae7a, 0x4072, 0xae, 0x18, 0x11, 0x28, 0x15, 0x4f, 0xba, 0x97);
77 DEFINE_GUID(IID_IXACTEngine, 0x7cdd1894, 0x643b, 0x4168, 0x83, 0x6f, 0xd1, 0x9d, 0x59, 0xd0, 0xce, 0x53);
78 #else
79 DEFINE_GUID(CLSID_XACTEngine, 0x0aa000aa, 0xf404, 0x11d9, 0xbd, 0x7a, 0x00, 0x10, 0xdc, 0x4f, 0x8f, 0x81);
80 DEFINE_GUID(CLSID_XACTAuditionEngine, 0x0aa000ab, 0xf404, 0x11d9, 0xbd, 0x7a, 0x00, 0x10, 0xdc, 0x4f, 0x8f, 0x81);
81 DEFINE_GUID(CLSID_XACTDebugEngine, 0x0aa000ac, 0xf404, 0x11d9, 0xbd, 0x7a, 0x00, 0x10, 0xdc, 0x4f, 0x8f, 0x81);
82 DEFINE_GUID(IID_IXACTEngine, 0x0aa000a0, 0xf404, 0x11d9, 0xbd, 0x7a, 0x00, 0x10, 0xdc, 0x4f, 0x8f, 0x81);
83 #endif
85 typedef struct IXACTSoundBank IXACTSoundBank;
86 typedef struct IXACTWaveBank IXACTWaveBank;
87 typedef struct IXACTCue IXACTCue;
88 typedef struct IXACTWave IXACTWave;
89 typedef struct IXACTEngine IXACTEngine;
91 typedef WORD XACTCATEGORY;
92 typedef BYTE XACTCHANNEL;
93 typedef WORD XACTINDEX;
94 typedef BYTE XACTINSTANCELIMIT;
95 typedef BYTE XACTLOOPCOUNT;
96 typedef BYTE XACTNOTIFICATIONTYPE;
97 typedef SHORT XACTPITCH;
98 typedef BYTE XACTPRIORITY;
99 typedef LONG XACTTIME;
100 typedef WORD XACTVARIABLEINDEX;
101 typedef FLOAT XACTVARIABLEVALUE;
102 typedef BYTE XACTVARIATIONWEIGHT;
103 typedef FLOAT XACTVOLUME;
105 static const XACTCATEGORY XACTCATEGORY_MIN = 0x0;
106 static const XACTCATEGORY XACTCATEGORY_MAX = 0xfffe;
107 static const XACTCATEGORY XACTCATEGORY_INVALID = 0xffff;
108 static const XACTCHANNEL XACTCHANNEL_MIN = 0;
109 static const XACTCHANNEL XACTCHANNEL_MAX = 0xff;
110 static const XACTINDEX XACTINDEX_MIN = 0x0;
111 static const XACTINDEX XACTINDEX_MAX = 0xfffe;
112 static const XACTINDEX XACTINDEX_INVALID = 0xffff;
113 static const XACTINSTANCELIMIT XACTINSTANCELIMIT_INFINITE = 0xff;
114 static const XACTINSTANCELIMIT XACTINSTANCELIMIT_MIN = 0x00;
115 static const XACTINSTANCELIMIT XACTINSTANCELIMIT_MAX = 0xfe;
116 static const XACTLOOPCOUNT XACTLOOPCOUNT_MIN = 0x0;
117 static const XACTLOOPCOUNT XACTLOOPCOUNT_MAX = 0xfe;
118 static const XACTLOOPCOUNT XACTLOOPCOUNT_INFINITE = 0xff;
119 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_MIN = 0x00;
120 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_MAX = 0xff;
121 static const XACTPITCH XACTPITCH_MIN = -1200;
122 static const XACTPITCH XACTPITCH_MAX = 1200;
123 static const XACTPITCH XACTPITCH_MIN_TOTAL = -2400;
124 static const XACTPITCH XACTPITCH_MAX_TOTAL = 2400;
125 static const XACTTIME XACTTIME_MIN = INT_MIN;
126 static const XACTTIME XACTTIME_MAX = INT_MAX;
127 static const XACTTIME XACTTIME_INFINITE = INT_MAX;
128 static const XACTVARIABLEINDEX XACTVARIABLEINDEX_MIN = 0x0000;
129 static const XACTVARIABLEINDEX XACTVARIABLEINDEX_MAX = 0xfffe;
130 static const XACTVARIABLEINDEX XACTVARIABLEINDEX_INVALID = 0xffff;
131 static const XACTVARIABLEVALUE XACTPARAMETERVALUE_MIN = -FLT_MAX;
132 static const XACTVARIABLEVALUE XACTPARAMETERVALUE_MAX = FLT_MAX;
133 static const XACTVARIABLEVALUE XACTVARIABLEVALUE_MIN = -FLT_MAX;
134 static const XACTVARIABLEVALUE XACTVARIABLEVALUE_MAX = FLT_MAX;
135 static const XACTVOLUME XACTVOLUME_MIN = 0.0f;
136 static const XACTVOLUME XACTVOLUME_MAX = FLT_MAX;
137 static const DWORD XACTWAVEALIGNMENT_MIN = 2048;
140 #define FACILITY_XACTENGINE 0xac7
141 #define XACTENGINEERROR(n) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_XACTENGINE, n)
143 #define XACTENGINE_E_OUTOFMEMORY E_OUTOFMEMORY
144 #define XACTENGINE_E_INVALIDARG E_INVALIDARG
145 #define XACTENGINE_E_NOTIMPL E_NOTIMPL
146 #define XACTENGINE_E_FAIL E_FAIL
148 #define XACTENGINE_E_ALREADYINITIALIZED XACTENGINEERROR(0x001)
149 #define XACTENGINE_E_NOTINITIALIZED XACTENGINEERROR(0x002)
150 #define XACTENGINE_E_EXPIRED XACTENGINEERROR(0x003)
151 #define XACTENGINE_E_NONOTIFICATIONCALLBACK XACTENGINEERROR(0x004)
152 #define XACTENGINE_E_NOTIFICATIONREGISTERED XACTENGINEERROR(0x005)
153 #define XACTENGINE_E_INVALIDUSAGE XACTENGINEERROR(0x006)
154 #define XACTENGINE_E_INVALIDDATA XACTENGINEERROR(0x007)
155 #define XACTENGINE_E_INSTANCELIMITFAILTOPLAY XACTENGINEERROR(0x008)
156 #define XACTENGINE_E_NOGLOBALSETTINGS XACTENGINEERROR(0x009)
157 #define XACTENGINE_E_INVALIDVARIABLEINDEX XACTENGINEERROR(0x00a)
158 #define XACTENGINE_E_INVALIDCATEGORY XACTENGINEERROR(0x00b)
159 #define XACTENGINE_E_INVALIDCUEINDEX XACTENGINEERROR(0x00c)
160 #define XACTENGINE_E_INVALIDWAVEINDEX XACTENGINEERROR(0x00d)
161 #define XACTENGINE_E_INVALIDTRACKINDEX XACTENGINEERROR(0x00e)
162 #define XACTENGINE_E_INVALIDSOUNDOFFSETORINDEX XACTENGINEERROR(0x00f)
163 #define XACTENGINE_E_READFILE XACTENGINEERROR(0x010)
164 #define XACTENGINE_E_UNKNOWNEVENT XACTENGINEERROR(0x011)
165 #define XACTENGINE_E_INCALLBACK XACTENGINEERROR(0x012)
166 #define XACTENGINE_E_NOWAVEBANK XACTENGINEERROR(0x013)
167 #define XACTENGINE_E_SELECTVARIATION XACTENGINEERROR(0x014)
168 #define XACTENGINE_E_MULTIPLEAUDITIONENGINES XACTENGINEERROR(0x015)
169 #define XACTENGINE_E_WAVEBANKNOTPREPARED XACTENGINEERROR(0x016)
170 #define XACTENGINE_E_NORENDERER XACTENGINEERROR(0x017)
171 #define XACTENGINE_E_INVALIDENTRYCOUNT XACTENGINEERROR(0x018)
172 #define XACTENGINE_E_SEEKTIMEBEYONDCUEEND XACTENGINEERROR(0x019)
173 #define XACTENGINE_E_SEEKTIMEBEYONDWAVEEND XACTENGINEERROR(0x019)
174 #define XACTENGINE_E_NOFRIENDLYNAMES XACTENGINEERROR(0x01a)
175 #define XACTENGINE_E_AUDITION_WRITEFILE XACTENGINEERROR(0x101)
176 #define XACTENGINE_E_AUDITION_NOSOUNDBANK XACTENGINEERROR(0x102)
177 #define XACTENGINE_E_AUDITION_INVALIDRPCINDEX XACTENGINEERROR(0x103)
178 #define XACTENGINE_E_AUDITION_MISSINGDATA XACTENGINEERROR(0x104)
179 #define XACTENGINE_E_AUDITION_UNKNOWNCOMMAND XACTENGINEERROR(0x105)
180 #define XACTENGINE_E_AUDITION_INVALIDDSPINDEX XACTENGINEERROR(0x106)
181 #define XACTENGINE_E_AUDITION_MISSINGWAVE XACTENGINEERROR(0x107)
182 #define XACTENGINE_E_AUDITION_CREATEDIRECTORYFAILED XACTENGINEERROR(0x108)
183 #define XACTENGINE_E_AUDITION_INVALIDSESSION XACTENGINEERROR(0x109)
185 static const DWORD XACT_FLAG_STOP_RELEASE = 0x00000000;
186 static const DWORD XACT_FLAG_STOP_IMMEDIATE = 0x00000001;
187 static const DWORD XACT_FLAG_MANAGEDATA = 0x00000001;
188 static const DWORD XACT_FLAG_BACKGROUND_MUSIC = 0x00000002;
189 static const DWORD XACT_FLAG_UNITS_MS = 0x00000004;
190 static const DWORD XACT_FLAG_UNITS_SAMPLES = 0x00000008;
191 #define XACT_FLAG_CUE_STOP_RELEASE XACT_FLAG_STOP_RELEASE
192 #define XACT_FLAG_CUE_STOP_IMMEDIATE XACT_FLAG_STOP_IMMEDIATE
193 #define XACT_FLAG_GLOBAL_SETTINGS_MANAGEDATA XACT_FLAG_MANAGEDATA
194 #define XACT_FLAG_SOUNDBANK_STOP_IMMEDIATE XACT_FLAG_STOP_IMMEDIATE
195 #define XACT_FLAG_ENGINE_CREATE_MANAGEDATA XACT_FLAG_MANAGEDATA
196 #define XACT_FLAG_ENGINE_STOP_IMMEDIATE XACT_FLAG_STOP_IMMEDIATE
198 static const DWORD XACT_STATE_CREATED = 0x00000001;
199 static const DWORD XACT_STATE_PREPARING = 0x00000002;
200 static const DWORD XACT_STATE_PREPARED = 0x00000004;
201 static const DWORD XACT_STATE_PLAYING = 0x00000008;
202 static const DWORD XACT_STATE_STOPPING = 0x00000010;
203 static const DWORD XACT_STATE_STOPPED = 0x00000020;
204 static const DWORD XACT_STATE_PAUSED = 0x00000040;
205 static const DWORD XACT_STATE_INUSE = 0x00000080;
206 static const DWORD XACT_STATE_PREPAREFAILED = 0x80000000;
207 #define XACT_CUESTATE_CREATED XACT_STATE_CREATED
208 #define XACT_CUESTATE_PREPARING XACT_STATE_PREPARING
209 #define XACT_CUESTATE_PREPARED XACT_STATE_PREPARED
210 #define XACT_CUESTATE_PLAYING XACT_STATE_PLAYING
211 #define XACT_CUESTATE_STOPPING XACT_STATE_STOPPING
212 #define XACT_CUESTATE_STOPPED XACT_STATE_STOPPED
213 #define XACT_CUESTATE_PAUSED XACT_STATE_PAUSED
214 #define XACT_SOUNDBANKSTATE_INUSE XACT_STATE_INUSE
215 #define XACT_WAVEBANKSTATE_INUSE XACT_STATE_INUSE
216 #define XACT_WAVEBANKSTATE_PREPARED XACT_STATE_PREPARED
217 #define XACT_WAVEBANKSTATE_PREPAREFAILED XACT_STATE_PREPAREFAILED
219 #define XACT_RENDERER_ID_LENGTH 0xff
220 #define XACT_RENDERER_NAME_LENGTH 0xff
221 #define XACT_CUE_NAME_LENGTH 0xff
223 #define XACT_ENGINE_LOOKAHEAD_DEFAULT 250
225 static const DWORD XACT_FLAG_API_AUDITION_MODE = 0x00000001;
226 static const DWORD XACT_FLAG_API_DEBUG_MODE = 0x00000002;
228 #define XACT_DEBUGENGINE_REGISTRY_KEY TEXT("Software\\Microsoft\\XACT")
229 #define XACT_DEBUGENGINE_REGISTRY_VALUE TEXT("DebugEngine")
231 typedef struct XACT_RENDERER_DETAILS
233 WCHAR rendererID[XACT_RENDERER_ID_LENGTH];
234 WCHAR displayName[XACT_RENDERER_NAME_LENGTH];
235 BOOL defaultDevice;
236 } XACT_RENDERER_DETAILS, *LPXACT_RENDERER_DETAILS;
238 typedef BOOL (__stdcall *XACT_READFILE_CALLBACK)(HANDLE file, void *buffer, DWORD size, DWORD *ret_size, OVERLAPPED *overlapped);
239 typedef BOOL (__stdcall *XACT_GETOVERLAPPEDRESULT_CALLBACK)(HANDLE file, OVERLAPPED *overlapped, DWORD *ret_size, BOOL wait);
241 typedef struct XACT_FILEIO_CALLBACKS
243 XACT_READFILE_CALLBACK readFileCallback;
244 XACT_GETOVERLAPPEDRESULT_CALLBACK getOverlappedResultCallback;
245 } XACT_FILEIO_CALLBACKS, *PXACT_FILEIO_CALLBACKS;
246 typedef const XACT_FILEIO_CALLBACKS *PCXACT_FILEIO_CALLBACKS;
248 typedef struct XACT_STREAMING_PARAMETERS
250 HANDLE file;
251 DWORD offset;
252 DWORD flags;
253 WORD packetSize;
254 } XACT_STREAMING_PARAMETERS, *LPXACT_STREAMING_PARAMETERS, XACT_WAVEBANK_STREAMING_PARAMETERS, *LPXACT_WAVEBANK_STREAMING_PARAMETERS;
255 typedef const XACT_STREAMING_PARAMETERS *LPCXACT_STREAMING_PARAMETERS, *LPCXACT_WAVEBANK_STREAMING_PARAMETERS;
257 typedef struct XACT_CUE_PROPERTIES
259 char friendlyName[XACT_CUE_NAME_LENGTH];
260 BOOL interactive;
261 XACTINDEX iaVariableIndex;
262 XACTINDEX numVariations;
263 XACTINSTANCELIMIT maxInstances;
264 XACTINSTANCELIMIT currentInstances;
265 } XACT_CUE_PROPERTIES, *LPXACT_CUE_PROPERTIES;
267 typedef struct XACT_TRACK_PROPERTIES
269 XACTTIME duration;
270 XACTINDEX numVariations;
271 XACTCHANNEL numChannels;
272 XACTINDEX waveVariation;
273 XACTLOOPCOUNT loopCount;
274 } XACT_TRACK_PROPERTIES, *LPXACT_TRACK_PROPERTIES;
276 typedef struct XACT_VARIATION_PROPERTIES
278 XACTINDEX index;
279 XACTVARIATIONWEIGHT weight;
280 XACTVARIABLEVALUE iaVariableMin;
281 XACTVARIABLEVALUE iaVariableMax;
282 BOOL linger;
283 } XACT_VARIATION_PROPERTIES, *LPXACT_VARIATION_PROPERTIES;
285 typedef struct XACT_SOUND_PROPERTIES
287 XACTCATEGORY category;
288 BYTE priority;
289 XACTPITCH pitch;
290 XACTVOLUME volume;
291 XACTINDEX numTracks;
292 XACT_TRACK_PROPERTIES arrTrackProperties[1];
293 } XACT_SOUND_PROPERTIES, *LPXACT_SOUND_PROPERTIES;
295 typedef struct XACT_SOUND_VARIATION_PROPERTIES
297 XACT_VARIATION_PROPERTIES variationProperties;
298 XACT_SOUND_PROPERTIES soundProperties;
299 } XACT_SOUND_VARIATION_PROPERTIES, *LPXACT_SOUND_VARIATION_PROPERTIES;
301 typedef struct XACT_CUE_INSTANCE_PROPERTIES
303 DWORD allocAttributes;
304 XACT_CUE_PROPERTIES cueProperties;
305 XACT_SOUND_VARIATION_PROPERTIES activeVariationProperties;
306 } XACT_CUE_INSTANCE_PROPERTIES, *LPXACT_CUE_INSTANCE_PROPERTIES;
308 typedef struct XACTCHANNELMAPENTRY
310 XACTCHANNEL InputChannel;
311 XACTCHANNEL OutputChannel;
312 XACTVOLUME Volume;
313 } XACTCHANNELMAPENTRY, *LPXACTCHANNELMAPENTRY;
314 typedef const XACTCHANNELMAPENTRY *LPCXACTCHANNELMAPENTRY;
316 typedef struct XACTCHANNELMAP
318 XACTCHANNEL EntryCount;
319 XACTCHANNELMAPENTRY *paEntries;
320 } XACTCHANNELMAP, *LPXACTCHANNELMAP;
321 typedef const XACTCHANNELMAP *LPCXACTCHANNELMAP;
323 typedef struct XACTCHANNELVOLUMEENTRY
325 XACTCHANNEL EntryIndex;
326 XACTVOLUME Volume;
327 } XACTCHANNELVOLUMEENTRY, *LPXACTCHANNELVOLUMEENTRY;
328 typedef const XACTCHANNELVOLUMEENTRY *LPCXACTCHANNELVOLUMEENTRY;
330 typedef struct XACTCHANNELVOLUME
332 XACTCHANNEL EntryCount;
333 XACTCHANNELVOLUMEENTRY *paEntries;
334 } XACTCHANNELVOLUME, *LPXACTCHANNELVOLUME;
335 typedef const XACTCHANNELVOLUME *LPCXACTCHANNELVOLUME;
337 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_CUEPREPARED = 1;
338 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_CUEPLAY = 2;
339 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_CUESTOP = 3;
340 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_CUEDESTROYED = 4;
341 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_MARKER = 5;
342 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_SOUNDBANKDESTROYED = 6;
343 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEBANKDESTROYED = 7;
344 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_LOCALVARIABLECHANGED = 8;
345 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_GLOBALVARIABLECHANGED = 9;
346 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_GUICONNECTED = 10;
347 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_GUIDISCONNECTED = 11;
348 #if XACT3_VER >= 0x0205
349 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEPREPARED = 12;
350 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEPLAY = 13;
351 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVESTOP = 14;
352 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVELOOPED = 15;
353 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEDESTROYED = 16;
354 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEBANKPREPARED = 17;
355 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEBANKSTREAMING_INVALIDCONTENT = 18;
356 #else
357 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEPLAY = 12;
358 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVESTOP = 13;
359 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEBANKPREPARED = 14;
360 static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEBANKSTREAMING_INVALIDCONTENT = 15;
361 #endif
363 static const BYTE XACT_FLAG_NOTIFICATION_PERSIST = 0x01;
365 #ifndef WAVE_FORMAT_IEEE_FLOAT
366 #define WAVE_FORMAT_IEEE_FLOAT 0x0003
367 #endif
368 #ifndef WAVE_FORMAT_EXTENSIBLE
369 #define WAVE_FORMAT_EXTENSIBLE 0xfffe
370 #endif
372 #include <pshpack1.h>
374 #ifndef _WAVEFORMATEX_
375 #define _WAVEFORMATEX_
376 typedef struct _WAVEFORMATEX
378 WORD wFormatTag;
379 WORD nChannels;
380 DWORD nSamplesPerSec;
381 DWORD nAvgBytesPerSec;
382 WORD nBlockAlign;
383 WORD wBitsPerSample;
384 WORD cbSize;
385 } WAVEFORMATEX, *PWAVEFORMATEX, *NPWAVEFORMATEX, *LPWAVEFORMATEX;
386 #endif
388 #ifndef _WAVEFORMATEXTENSIBLE_
389 #define _WAVEFORMATEXTENSIBLE_
390 typedef struct
392 WAVEFORMATEX Format;
393 union
395 WORD wValidBitsPerSample;
396 WORD wSamplesPerBlock;
397 WORD wReserved;
398 } Samples;
399 DWORD dwChannelMask;
400 GUID SubFormat;
401 } WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE;
402 #endif
404 typedef struct XACT_NOTIFICATION_CUE
406 XACTINDEX cueIndex;
407 IXACTSoundBank *pSoundBank;
408 IXACTCue *pCue;
409 } XACT_NOTIFICATION_CUE, *LPXACT_NOTIFICATION_CUE;
410 typedef const XACT_NOTIFICATION_CUE *LPCXACT_NOTIFICATION_CUE;
412 typedef struct XACT_NOTIFICATION_DESCRIPTION
414 XACTNOTIFICATIONTYPE type;
415 BYTE flags;
416 IXACTSoundBank *pSoundBank;
417 IXACTWaveBank *pWaveBank;
418 IXACTCue *pCue;
419 #if XACT3_VER >= 0x0205
420 IXACTWave *pWave;
421 #endif
422 XACTINDEX cueIndex;
423 #if XACT3_VER >= 0x0205
424 XACTINDEX waveIndex;
425 #endif
426 void *pvContext;
427 } XACT_NOTIFICATION_DESCRIPTION, *LPXACT_NOTIFICATION_DESCRIPTION;
428 typedef const XACT_NOTIFICATION_DESCRIPTION *LPCXACT_NOTIFICATION_DESCRIPTION;
430 typedef struct XACT_NOTIFICATION_GUI
432 DWORD reserved;
433 } XACT_NOTIFICATION_GUI, *LPXACT_NOTIFICATION_GUI;
434 typedef const XACT_NOTIFICATION_GUI *LPCXACT_NOTIFICATION_GUI;
436 typedef struct XACT_NOTIFICATION_MARKER
438 XACTINDEX cueIndex;
439 IXACTSoundBank *pSoundBank;
440 IXACTCue *pCue;
441 DWORD marker;
442 } XACT_NOTIFICATION_MARKER, *LPXACT_NOTIFICATION_MARKER;
443 typedef const XACT_NOTIFICATION_MARKER *LPCXACT_NOTIFICATION_MARKER;
445 typedef struct XACT_NOTIFICATION_SOUNDBANK
447 IXACTSoundBank *pSoundBank;
448 } XACT_NOTIFICATION_SOUNDBANK, *LPXACT_NOTIFICATION_SOUNDBANK;
449 typedef const XACT_NOTIFICATION_SOUNDBANK *LPCXACT_NOTIFICATION_SOUNDBANK;
451 typedef struct XACT_NOTIFICATION_VARIABLE
453 XACTINDEX cueIndex;
454 IXACTSoundBank *pSoundBank;
455 IXACTCue *pCue;
456 XACTVARIABLEINDEX variableIndex;
457 XACTVARIABLEVALUE variableValue;
458 BOOL local;
459 } XACT_NOTIFICATION_VARIABLE, *LPXACT_NOTIFICATION_VARIABLE;
460 typedef const XACT_NOTIFICATION_VARIABLE *LPCXACT_NOTIFICATION_VARIABLE;
462 typedef struct XACT_NOTIFICATION_WAVE
464 IXACTWaveBank *pWaveBank;
465 XACTINDEX waveIndex;
466 XACTINDEX cueIndex;
467 IXACTSoundBank *pSoundBank;
468 IXACTCue *pCue;
469 #if XACT3_VER >= 0x0205
470 IXACTWave *pWave;
471 #endif
472 } XACT_NOTIFICATION_WAVE, *LPXACT_NOTIFICATION_WAVE;
473 typedef const XACT_NOTIFICATION_WAVE *LPCXACT_NOTIFICATION_NAME;
475 typedef struct XACT_NOTIFICATION_WAVEBANK
477 IXACTWaveBank *pWaveBank;
478 } XACT_NOTIFICATION_WAVEBANK, *LPXACT_NOTIFICATION_WAVEBANK;
479 typedef const XACT_NOTIFICATION_WAVEBANK *LPCXACT_NOTIFICATION_WAVEBANK;
481 typedef struct XACT_NOTIFICATION
483 XACTNOTIFICATIONTYPE type;
484 LONG timeStamp;
485 void *pvContext;
486 union
488 XACT_NOTIFICATION_CUE cue;
489 XACT_NOTIFICATION_MARKER marker;
490 XACT_NOTIFICATION_SOUNDBANK soundBank;
491 XACT_NOTIFICATION_WAVEBANK waveBank;
492 XACT_NOTIFICATION_VARIABLE variable;
493 XACT_NOTIFICATION_GUI gui;
494 XACT_NOTIFICATION_WAVE wave;
496 } XACT_NOTIFICATION, *LPXACT_NOTIFICATION;
497 typedef const XACT_NOTIFICATION *LPCXACT_NOTIFICATION;
499 #include <poppack.h>
501 typedef struct XACT_WAVE_PROPERTIES
503 char friendlyName[WAVEBANK_ENTRYNAME_LENGTH];
504 WAVEBANKMINIWAVEFORMAT format;
505 DWORD durationInSamples;
506 WAVEBANKSAMPLEREGION loopRegion;
507 BOOL streaming;
508 } XACT_WAVE_PROPERTIES, *LPXACT_WAVE_PROPERTIES;
509 typedef const XACT_WAVE_PROPERTIES *LPCXACT_WAVE_PROPERTIES;
511 typedef struct XACT_WAVE_INSTANCE_PROPERTIES
513 XACT_WAVE_PROPERTIES properties;
514 BOOL backgroundMusic;
515 } XACT_WAVE_INSTANCE_PROPERTIES, *LPXACT_WAVE_INSTANCE_PROPERTIES;
516 typedef const XACT_WAVE_INSTANCE_PROPERTIES *LPCXACT_WAVE_INSTANCE_PROPERTIES;
518 typedef void (__stdcall *XACT_NOTIFICATION_CALLBACK)(const XACT_NOTIFICATION *notification);
520 typedef struct XACT_RUNTIME_PARAMETERS
522 DWORD lookAheadTime;
523 void *pGlobalSettingsBuffer;
524 DWORD globalSettingsBufferSize;
525 DWORD globalSettingsFlags;
526 DWORD globalSettingsAllocAttributes;
527 XACT_FILEIO_CALLBACKS fileIOCallbacks;
528 XACT_NOTIFICATION_CALLBACK fnNotificationCallback;
529 const WCHAR *pRendererID;
530 } XACT_RUNTIME_PARAMETERS, *LPXACT_RUNTIME_PARAMETERS;
531 typedef const XACT_RUNTIME_PARAMETERS *LPCXACT_RUNTIME_PARAMETERS;
533 #define INTERFACE IXACTCue
534 DECLARE_INTERFACE(IXACTCue)
536 STDMETHOD(Play)(THIS) PURE;
537 STDMETHOD(Stop)(THIS_ DWORD flags) PURE;
538 STDMETHOD(GetState)(THIS_ DWORD *state) PURE;
539 STDMETHOD(Destroy)(THIS) PURE;
540 STDMETHOD(GetChannelMap)(THIS_ XACTCHANNELMAP *map, DWORD buffer_size, DWORD *needed_size) PURE;
541 STDMETHOD(SetChannelMap)(THIS_ XACTCHANNELMAP *map) PURE;
542 STDMETHOD(GetChannelVolume)(THIS_ XACTCHANNELVOLUME *volume) PURE;
543 STDMETHOD(SetChannelVolume)(THIS_ XACTCHANNELVOLUME *volume) PURE;
544 STDMETHOD(SetMatrixCoefficients)(THIS_ UINT32 src_count, UINT32 dst_count, float *coefficients) PURE;
545 STDMETHOD_(XACTVARIABLEINDEX,GetVariableIndex)(THIS_ const char *name) PURE;
546 STDMETHOD(SetVariable)(THIS_ XACTVARIABLEINDEX index, XACTVARIABLEVALUE value) PURE;
547 STDMETHOD(GetVariable)(THIS_ XACTVARIABLEINDEX index, XACTVARIABLEVALUE *value) PURE;
548 STDMETHOD(Pause)(THIS_ BOOL pause) PURE;
549 #if XACT3_VER >= 0x0205
550 STDMETHOD(GetProperties)(THIS_ XACT_CUE_INSTANCE_PROPERTIES **properties) PURE;
551 #endif
553 #undef INTERFACE
555 #ifndef __cplusplus
556 #define IXACTCue_Play(p) (p)->lpVtbl->Destroy(p)
557 #define IXACTCue_Stop(p,a) (p)->lpVtbl->Stop(p,a)
558 #define IXACTCue_GetState(p,a) (p)->lpVtbl->GetState(p,a)
559 #define IXACTCue_Destroy(p) (p)->lpVtbl->Destroy(p)
560 #define IXACTCue_GetChannelMap(p,a,b,c) (p)->lpVtbl->GetChannelMap(p,a,b,c)
561 #define IXACTCue_SetChannelMap(p,a) (p)->lpVtbl->SetChannelMap(p,a)
562 #define IXACTCue_GetChannelVolume(p,a) (p)->lpVtbl->GetChannelVolume(p,a)
563 #define IXACTCue_SetChannelVolume(p,a) (p)->lpVtbl->SetChannelVolume(p,a)
564 #define IXACTCue_SetMatrixCoefficients(p,a,b,c) (p)->lpVtbl->SetMatrixCoefficients(p,a,b,c)
565 #define IXACTCue_GetVariableIndex(p,a) (p)->lpVtbl->GetVariableIndex(p,a)
566 #define IXACTCue_SetVariable(p,a,b) (p)->lpVtbl->SetVariable(p,a,b)
567 #define IXACTCue_GetVariable(p,a,b) (p)->lpVtbl->GetVariable(p,a,b)
568 #define IXACTCue_Pause(p,a) (p)->lpVtbl->Pause(p,a)
569 #if XACT3_VER >= 0x0205
570 #define IXACTCue_GetProperties(p,a) (p)->lpVtbl->GetProperties(p,a)
571 #endif
572 #else
573 #define IXACTCue_Play(p) (p)->Destroy()
574 #define IXACTCue_Stop(p,a) (p)->Stop(a)
575 #define IXACTCue_GetState(p,a) (p)->Stop(a)
576 #define IXACTCue_Destroy(p) (p)->Destroy()
577 #define IXACTCue_GetChannelMap(p,a,b,c) (p)->GetChannelMap(a,b,c)
578 #define IXACTCue_SetChannelMap(p,a) (p)->SetChannelMap(a)
579 #define IXACTCue_GetChannelVolume(p,a) (p)->GetChannelVolume(a)
580 #define IXACTCue_SetChannelVolume(p,a) (p)->SetChannelVolume(a)
581 #define IXACTCue_SetMatrixCoefficients(p,a,b,c) (p)->SetMatrixCoefficients(a,b,c)
582 #define IXACTCue_GetVariableIndex(p,a) (p)->GetVariableIndex(a)
583 #define IXACTCue_SetVariable(p,a,b) (p)->SetVariable(a,b)
584 #define IXACTCue_GetVariable(p,a,b) (p)->GetVariable(a,b)
585 #define IXACTCue_Pause(p,a) (p)->Pause(a)
586 #if XACT3_VER >= 0x0205
587 #define IXACTCue_GetProperties(p,a) (p)->GetProperties(a)
588 #endif
589 #endif
591 #define INTERFACE IXACTWave
592 DECLARE_INTERFACE(IXACTWave)
594 STDMETHOD(Destroy)(THIS) PURE;
595 STDMETHOD(Play)(THIS) PURE;
596 STDMETHOD(Stop)(THIS_ DWORD flags) PURE;
597 STDMETHOD(Pause)(THIS_ BOOL pause) PURE;
598 STDMETHOD(GetState)(THIS_ DWORD *state) PURE;
599 STDMETHOD(SetPitch)(THIS_ XACTPITCH pitch) PURE;
600 STDMETHOD(SetVolume)(THIS_ XACTVOLUME volume) PURE;
601 STDMETHOD(SetMatrixCoefficients)(THIS_ UINT32 src_count, UINT32 dst_count, float *coefficients) PURE;
602 STDMETHOD(GetProperties)(THIS_ XACT_WAVE_INSTANCE_PROPERTIES *properties) PURE;
604 #undef INTERFACE
606 #ifndef __cplusplus
607 #define IXACTWave_Destroy(p) (p)->lpVtbl->Destroy(p)
608 #define IXACTWave_Play(p) (p)->lpVtbl->Destroy(p)
609 #define IXACTWave_Stop(p,a) (p)->lpVtbl->Stop(p,a)
610 #define IXACTWave_Pause(p,a) (p)->lpVtbl->Pause(p,a)
611 #define IXACTWave_GetState(p,a) (p)->lpVtbl->GetState(p,a)
612 #define IXACTWave_SetPitch(p,a) (p)->lpVtbl->SetPitch(p,a)
613 #define IXACTWave_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a)
614 #define IXACTWave_SetMatrixCoefficients(p,a,b,c) (p)->lpVtbl->SetMatrixCoefficients(p,a,b,c)
615 #define IXACTWave_GetProperties(p,a) (p)->lpVtbl->GetProperties(p,a)
616 #else
617 #define IXACTWave_Destroy(p) (p)->Destroy()
618 #define IXACTWave_Play(p) (p)->Destroy()
619 #define IXACTWave_Stop(p,a) (p)->Stop(a)
620 #define IXACTWave_Pause(p,a) (p)->Pause(a)
621 #define IXACTWave_GetState(p,a) (p)->Stop(a)
622 #define IXACTWave_SetPitch(p,a) (p)->SetVariable(a)
623 #define IXACTWave_SetVolume(p,a) (p)->SetVolume(a)
624 #define IXACTWave_SetMatrixCoefficients(p,a,b,c) (p)->SetMatrixCoefficients(a,b,c)
625 #define IXACTWave_GetProperties(p,a) (p)->GetProperties(a)
626 #endif
628 #define INTERFACE IXACTSoundBank
629 DECLARE_INTERFACE(IXACTSoundBank)
631 STDMETHOD_(XACTINDEX,GetCueIndex)(THIS_ const char *name) PURE;
632 #if XACT3_VER >= 0x0205
633 STDMETHOD(GetNumCues)(THIS_ XACTINDEX *count) PURE;
634 STDMETHOD(GetCueProperties)(THIS_ XACTINDEX index, XACT_CUE_PROPERTIES *properties) PURE;
635 #endif
636 STDMETHOD(Prepare)(THIS_ XACTINDEX index, DWORD flags, XACTTIME offset, IXACTCue **cue) PURE;
637 STDMETHOD(Play)(THIS_ XACTINDEX index, DWORD flags, XACTTIME offset, IXACTCue **cue) PURE;
638 STDMETHOD(Stop)(THIS_ XACTINDEX index, DWORD flags) PURE;
639 STDMETHOD(Destroy)(THIS) PURE;
640 STDMETHOD(GetState)(THIS_ DWORD *state) PURE;
642 #undef INTERFACE
644 #ifndef __cplusplus
645 #define IXACTSoundBank_GetCueIndex(p,a) (p)->lpVtbl->GetCueIndex(p,a)
646 #if XACT3_VER >= 0x0205
647 #define IXACTSoundBank_GetNumCues(p,a) (p)->lpVtbl->GetNumCues(p,a)
648 #define IXACTSoundBank_GetCueProperties(p,a,b) (p)->lpVtbl->GetCueProperties(p,a,b)
649 #endif
650 #define IXACTSoundBank_Prepare(p,a,b,c,d) (p)->lpVtbl->Prepare(p,a,b,c,d)
651 #define IXACTSoundBank_Play(p,a,b,c,d) (p)->lpVtbl->Play(p,a,b,c,d)
652 #define IXACTSoundBank_Stop(p,a,b) (p)->lpVtbl->Stop(p,a,b)
653 #define IXACTSoundBank_Destroy(p) (p)->lpVtbl->Destroy(p)
654 #define IXACTSoundBank_GetState(p,a) (p)->lpVtbl->GetState(p,a)
655 #else
656 #define IXACTSoundBank_GetCueIndex(p,a) (p)->GetCueIndex(a)
657 #if XACT3_VER >= 0x0205
658 #define IXACTSoundBank_GetNumCues(p,a) (p)->GetNumCues(a)
659 #define IXACTSoundBank_GetCueProperties(p,a,b) (p)->GetCueProperties(a,b)
660 #endif
661 #define IXACTSoundBank_Prepare(p,a,b,c,d) (p)->Prepare(a,b,c,d)
662 #define IXACTSoundBank_Play(p,a,b,c,d) (p)->Play(a,b,c,d)
663 #define IXACTSoundBank_Stop(p,a,b) (p)->Stop(a,b)
664 #define IXACTSoundBank_Destroy(p) (p)->Destroy()
665 #define IXACTSoundBank_GetState(p,a) (p)->GetState(a)
666 #endif
668 #define INTERFACE IXACTWaveBank
669 DECLARE_INTERFACE(IXACTWaveBank)
671 STDMETHOD(Destroy)(THIS) PURE;
672 #if XACT3_VER >= 0x0205
673 STDMETHOD(GetNumWaves)(THIS_ XACTINDEX *count) PURE;
674 STDMETHOD_(XACTINDEX,GetWaveIndex)(THIS_ const char *name) PURE;
675 STDMETHOD(GetWaveProperties)(THIS_ XACTINDEX index, LPXACT_WAVE_PROPERTIES pWaveProperties) PURE;
676 STDMETHOD(Prepare)(THIS_ XACTINDEX index, DWORD flags, DWORD offset, XACTLOOPCOUNT loop_count, IXACTWave **wave) PURE;
677 STDMETHOD(Play)(THIS_ XACTINDEX index, DWORD flags, DWORD offset, XACTLOOPCOUNT loop_count, IXACTWave **wave) PURE;
678 STDMETHOD(Stop)(THIS_ XACTINDEX index, DWORD flags) PURE;
679 #endif
680 STDMETHOD(GetState)(THIS_ DWORD *state) PURE;
682 #undef INTERFACE
684 #ifndef __cplusplus
685 #define IXACTWaveBank_Destroy(p) (p)->lpVtbl->Destroy(p)
686 #if XACT3_VER >= 0x0205
687 #define IXACTWaveBank_GetNumWaves(p,a) (p)->lpVtbl->GetNumCues(p,a)
688 #define IXACTWaveBank_GetWaveIndex(p,a) (p)->lpVtbl->GetWaveIndex(p,a)
689 #define IXACTWaveBank_GetWaveProperties(p,a,b) (p)->lpVtbl->GetWaveProperties(p,a,b)
690 #define IXACTWaveBank_Prepare(p,a,b,c,d,e) (p)->lpVtbl->Prepare(p,a,b,c,d,e)
691 #define IXACTWaveBank_Play(p,a,b,c,d,e) (p)->lpVtbl->Play(p,a,b,c,d,e)
692 #define IXACTWaveBank_Stop(p,a,b) (p)->lpVtbl->Stop(p,a,b)
693 #endif
694 #define IXACTWaveBank_GetState(p,a) (p)->lpVtbl->GetState(p,a)
695 #else
696 #define IXACTWaveBank_Destroy(p) (p)->Destroy()
697 #if XACT3_VER >= 0x0205
698 #define IXACTWaveBank_GetNumWaves(p,a) (p)->GetNumWaves(a)
699 #define IXACTWaveBank_GetWaveIndex(p,a) (p)->GetWaveIndex(a)
700 #define IXACTWaveBank_GetWaveProperties(p,a,b) (p)->GetWaveProperties(a,b)
701 #define IXACTWaveBank_Prepare(p,a,b,c,d,e) (p)->Prepare(a,b,c,d,e)
702 #define IXACTWaveBank_Play(p,a,b,c,d,e) (p)->Play(a,b,c,d,e)
703 #define IXACTWaveBank_Stop(p,a,b) (p)->Stop(a,b)
704 #endif
705 #define IXACTWaveBank_GetState(p,a) (p)->GetState(a)
706 #endif
708 #define INTERFACE IXACTEngine
709 DECLARE_INTERFACE_(IXACTEngine,IUnknown)
711 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID iid, void **out) PURE;
712 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
713 STDMETHOD_(ULONG,Release)(THIS) PURE;
714 STDMETHOD(GetRendererCount)(THIS_ XACTINDEX *count) PURE;
715 STDMETHOD(GetRendererDetails)(THIS_ XACTINDEX index, XACT_RENDERER_DETAILS *details) PURE;
716 #if XACT3_VER >= 0x0205
717 STDMETHOD(GetFinalMixFormat)(THIS_ WAVEFORMATEXTENSIBLE *format) PURE;
718 #endif
719 STDMETHOD(Initialize)(THIS_ const XACT_RUNTIME_PARAMETERS *params) PURE;
720 STDMETHOD(Shutdown)(THIS) PURE;
721 STDMETHOD(DoWork)(THIS) PURE;
722 STDMETHOD(CreateSoundBank)(THIS_ const void *buffer, DWORD size, DWORD flags, DWORD alloc_flags, IXACTSoundBank **bank) PURE;
723 STDMETHOD(CreateInMemoryWaveBank)(THIS_ const void *buffer, DWORD size, DWORD flags, DWORD alloc_flags, IXACTWaveBank **bank) PURE;
724 STDMETHOD(CreateStreamingWaveBank)(THIS_ const XACT_WAVEBANK_STREAMING_PARAMETERS *params, IXACTWaveBank **bank) PURE;
725 #if XACT3_VER >= 0x0205
726 STDMETHOD(PrepareWave)(THIS_ DWORD flags, const char *path, WORD packet_size, DWORD alignment, DWORD offset, XACTLOOPCOUNT loop_count, IXACTWave **wave) PURE;
727 STDMETHOD(PrepareInMemoryWave)(THIS_ DWORD flags, WAVEBANKENTRY entry, DWORD *seek_table, BYTE *data, DWORD offset, XACTLOOPCOUNT loop_count, IXACTWave **wave) PURE;
728 STDMETHOD(PrepareStreamingWave)(THIS_ DWORD flags, WAVEBANKENTRY entry, XACT_STREAMING_PARAMETERS params, DWORD alignment, DWORD *seek_table, DWORD offset, XACTLOOPCOUNT loop_count, IXACTWave **wave) PURE;
729 #endif
730 STDMETHOD(RegisterNotification)(THIS_ const XACT_NOTIFICATION_DESCRIPTION *desc) PURE;
731 STDMETHOD(UnRegisterNotification)(THIS_ const XACT_NOTIFICATION_DESCRIPTION *desc) PURE;
732 STDMETHOD_(XACTCATEGORY,GetCategory)(THIS_ const char *name) PURE;
733 STDMETHOD(Stop)(THIS_ XACTCATEGORY category, DWORD flags) PURE;
734 STDMETHOD(SetVolume)(THIS_ XACTCATEGORY category, XACTVOLUME volume) PURE;
735 STDMETHOD(Pause)(THIS_ XACTCATEGORY category, BOOL pause) PURE;
736 STDMETHOD_(XACTVARIABLEINDEX,GetGlobalVariableIndex)(THIS_ const char *name) PURE;
737 STDMETHOD(SetGlobalVariable)(THIS_ XACTVARIABLEINDEX index, XACTVARIABLEVALUE value) PURE;
738 STDMETHOD(GetGlobalVariable)(THIS_ XACTVARIABLEINDEX index, XACTVARIABLEVALUE *value) PURE;
740 #undef INTERFACE
742 #ifndef __cplusplus
743 #define IXACTEngine_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
744 #define IXACTEngine_AddRef(p) (p)->lpVtbl->AddRef(p)
745 #define IXACTEngine_Release(p) (p)->lpVtbl->Release(p)
746 #define IXACTEngine_GetRendererCount(p,a) (p)->lpVtbl->GetRendererCount(p,a)
747 #define IXACTEngine_GetRendererDetails(p,a,b) (p)->lpVtbl->GetRendererDetails(p,a,b)
748 #if XACT3_VER >= 0x0205
749 #define IXACTEngine_GetFinalMixFormat(p,a) (p)->lpVtbl->GetFinalMixFormat(p,a)
750 #endif
751 #define IXACTEngine_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
752 #define IXACTEngine_Shutdown(p) (p)->lpVtbl->Shutdown(p)
753 #define IXACTEngine_DoWork(p) (p)->lpVtbl->DoWork(p)
754 #define IXACTEngine_CreateSoundBank(p,a,b,c,d,e) (p)->lpVtbl->CreateSoundBank(p,a,b,c,d,e)
755 #define IXACTEngine_CreateInMemoryWaveBank(p,a,b,c,d,e) (p)->lpVtbl->CreateInMemoryWaveBank(p,a,b,c,d,e)
756 #define IXACTEngine_CreateStreamingWaveBank(p,a,b) (p)->lpVtbl->CreateStreamingWaveBank(p,a,b)
757 #if XACT3_VER >= 0x0205
758 #define IXACTEngine_PrepareWave(p,a,b,c,d,e,f,g) (p)->lpVtbl->PrepareWave(p,a,b,c,d,e,f,g)
759 #define IXACTEngine_PrepareInMemoryWave(p,a,b,c,d,e,f,g) (p)->lpVtbl->PrepareInMemoryWave(p,a,b,c,d,e,f,g)
760 #define IXACTEngine_PrepareStreamingWave(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->PrepareStreamingWave(p,a,b,c,d,e,f,g,h)
761 #endif
762 #define IXACTEngine_RegisterNotification(p,a) (p)->lpVtbl->RegisterNotification(p,a)
763 #define IXACTEngine_UnRegisterNotification(p,a) (p)->lpVtbl->UnRegisterNotification(p,a)
764 #define IXACTEngine_GetCategory(p,a) (p)->lpVtbl->GetCategory(p,a)
765 #define IXACTEngine_Stop(p,a,b) (p)->lpVtbl->Stop(a,b)
766 #define IXACTEngine_SetVolume(p,a,b) (p)->lpVtbl->SetVolume(p,a,b)
767 #define IXACTEngine_Pause(p,a,b) (p)->lpVtbl->Pause(a,b)
768 #define IXACTEngine_GetGlobalVariableIndex(p,a) (p)->lpVtbl->GetGlobalVariableIndex(p,a)
769 #define IXACTEngine_SetGlobalVariable(p,a,b) (p)->lpVtbl->SetGlobalVariable(p,a,b)
770 #define IXACTEngine_GetGlobalVariable(p,a,b) (p)->lpVtbl->GetGlobalVariable(p,a,b)
771 #else
772 #define IXACTEngine_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
773 #define IXACTEngine_AddRef(p) (p)->AddRef()
774 #define IXACTEngine_Release(p) (p)->Release()
775 #define IXACTEngine_GetRendererCount(p,a) (p)->GetRendererCount(a)
776 #define IXACTEngine_GetRendererDetails(p,a,b) (p)->GetRendererDetails(a,b)
777 #if XACT3_VER >= 0x0205
778 #define IXACTEngine_GetFinalMixFormat(p,a) (p)->GetFinalMixFormat(a)
779 #endif
780 #define IXACTEngine_Initialize(p,a) (p)->Initialize(a)
781 #define IXACTEngine_Shutdown(p) (p)->Shutdown()
782 #define IXACTEngine_DoWork(p) (p)->DoWork()
783 #define IXACTEngine_CreateSoundBank(p,a,b,c,d,e) (p)->CreateSoundBank(a,b,c,d,e)
784 #define IXACTEngine_CreateInMemoryWaveBank(p,a,b,c,d,e) (p)->CreateInMemoryWaveBank(a,b,c,d,e)
785 #define IXACTEngine_CreateStreamingWaveBank(p,a,b) (p)->CreateStreamingWaveBank(a,b)
786 #if XACT3_VER >= 0x0205
787 #define IXACTEngine_PrepareWave(p,a,b,c,d,e,f,g) (p)->PrepareWave(a,b,c,d,e,f,g)
788 #define IXACTEngine_PrepareInMemoryWave(p,a,b,c,d,e,f,g) (p)->PrepareInMemoryWave(a,b,c,d,e,f,g)
789 #define IXACTEngine_PrepareStreamingWave(p,a,b,c,d,e,f,g,h) (p)->PrepareStreamingWave(a,b,c,d,e,f,g,h)
790 #endif
791 #define IXACTEngine_RegisterNotification(p,a) (p)->RegisterNotification(a)
792 #define IXACTEngine_UnRegisterNotification(p,a) (p)->UnRegisterNotification(a)
793 #define IXACTEngine_GetCategory(p,a) (p)->GetCategory(a)
794 #define IXACTEngine_Stop(p,a,b) (p)->Stop(a,b)
795 #define IXACTEngine_SetVolume(p,a,b) (p)->SetVolume(a,b)
796 #define IXACTEngine_Pause(p,a,b) (p)->Pause(a,b)
797 #define IXACTEngine_GetGlobalVariableIndex(p,a) (p)->GetGlobalVariableIndex(a)
798 #define IXACTEngine_SetGlobalVariable(p,a,b) (p)->SetGlobalVariable(a,b)
799 #define IXACTEngine_GetGlobalVariable(p,a,b) (p)->GetGlobalVariable(a,b)
800 #endif
802 #endif /* _XACT_H_ */