master
1/*** Autogenerated by WIDL 10.4 from include/xaudio2.idl - Do not edit ***/
2
3#ifdef _WIN32
4#ifndef __REQUIRED_RPCNDR_H_VERSION__
5#define __REQUIRED_RPCNDR_H_VERSION__ 475
6#endif
7#include <rpc.h>
8#include <rpcndr.h>
9#endif
10
11#ifndef COM_NO_WINDOWS_H
12#include <windows.h>
13#include <ole2.h>
14#endif
15
16#ifndef __xaudio2_h__
17#define __xaudio2_h__
18
19/* Forward declarations */
20
21#ifndef __IXAudio2EngineCallback_FWD_DEFINED__
22#define __IXAudio2EngineCallback_FWD_DEFINED__
23typedef interface IXAudio2EngineCallback IXAudio2EngineCallback;
24#ifdef __cplusplus
25interface IXAudio2EngineCallback;
26#endif /* __cplusplus */
27#endif
28
29#ifndef __IXAudio2Voice_FWD_DEFINED__
30#define __IXAudio2Voice_FWD_DEFINED__
31typedef interface IXAudio2Voice IXAudio2Voice;
32#ifdef __cplusplus
33interface IXAudio2Voice;
34#endif /* __cplusplus */
35#endif
36
37#ifndef __IXAudio2SourceVoice_FWD_DEFINED__
38#define __IXAudio2SourceVoice_FWD_DEFINED__
39typedef interface IXAudio2SourceVoice IXAudio2SourceVoice;
40#ifdef __cplusplus
41interface IXAudio2SourceVoice;
42#endif /* __cplusplus */
43#endif
44
45#ifndef __IXAudio2SubmixVoice_FWD_DEFINED__
46#define __IXAudio2SubmixVoice_FWD_DEFINED__
47typedef interface IXAudio2SubmixVoice IXAudio2SubmixVoice;
48#ifdef __cplusplus
49interface IXAudio2SubmixVoice;
50#endif /* __cplusplus */
51#endif
52
53#ifndef __IXAudio2MasteringVoice_FWD_DEFINED__
54#define __IXAudio2MasteringVoice_FWD_DEFINED__
55typedef interface IXAudio2MasteringVoice IXAudio2MasteringVoice;
56#ifdef __cplusplus
57interface IXAudio2MasteringVoice;
58#endif /* __cplusplus */
59#endif
60
61#ifndef __IXAudio2VoiceCallback_FWD_DEFINED__
62#define __IXAudio2VoiceCallback_FWD_DEFINED__
63typedef interface IXAudio2VoiceCallback IXAudio2VoiceCallback;
64#ifdef __cplusplus
65interface IXAudio2VoiceCallback;
66#endif /* __cplusplus */
67#endif
68
69#ifndef __IXAudio2_FWD_DEFINED__
70#define __IXAudio2_FWD_DEFINED__
71typedef interface IXAudio2 IXAudio2;
72#ifdef __cplusplus
73interface IXAudio2;
74#endif /* __cplusplus */
75#endif
76
77#ifndef __IXAudio2Extension_FWD_DEFINED__
78#define __IXAudio2Extension_FWD_DEFINED__
79typedef interface IXAudio2Extension IXAudio2Extension;
80#ifdef __cplusplus
81interface IXAudio2Extension;
82#endif /* __cplusplus */
83#endif
84
85/* Headers for imported files */
86
87#include <unknwn.h>
88#include <mmdeviceapi.h>
89#include <audiosessiontypes.h>
90#include <mmreg.h>
91
92#ifdef __cplusplus
93extern "C" {
94#endif
95
96#pragma pack(push,1)
97#ifndef __IXAudio2Voice_FWD_DEFINED__
98#define __IXAudio2Voice_FWD_DEFINED__
99typedef interface IXAudio2Voice IXAudio2Voice;
100#ifdef __cplusplus
101interface IXAudio2Voice;
102#endif /* __cplusplus */
103#endif
104
105typedef enum XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER {
106 Processor1 = 0x1,
107 Processor2 = 0x2,
108 Processor3 = 0x4,
109 Processor4 = 0x8,
110 Processor5 = 0x10,
111 Processor6 = 0x20,
112 Processor7 = 0x40,
113 Processor8 = 0x80,
114 Processor9 = 0x100,
115 Processor10 = 0x200,
116 Processor11 = 0x400,
117 Processor12 = 0x800,
118 Processor13 = 0x1000,
119 Processor14 = 0x2000,
120 Processor15 = 0x4000,
121 Processor16 = 0x8000,
122 Processor17 = 0x10000,
123 Processor18 = 0x20000,
124 Processor19 = 0x40000,
125 Processor20 = 0x80000,
126 Processor21 = 0x100000,
127 Processor22 = 0x200000,
128 Processor23 = 0x400000,
129 Processor24 = 0x800000,
130 Processor25 = 0x1000000,
131 Processor26 = 0x2000000,
132 Processor27 = 0x4000000,
133 Processor28 = 0x8000000,
134 Processor29 = 0x10000000,
135 Processor30 = 0x20000000,
136 Processor31 = 0x40000000,
137 Processor32 = 0x80000000,
138 XAUDIO2_ANY_PROCESSOR = 0xffffffff,
139 XAUDIO2_DEFAULT_PROCESSOR = XAUDIO2_ANY_PROCESSOR
140} XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER;
141typedef enum XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER XAUDIO2_PROCESSOR;
142typedef struct XAUDIO2_PERFORMANCE_DATA {
143 UINT64 AudioCyclesSinceLastQuery;
144 UINT64 TotalCyclesSinceLastQuery;
145 UINT32 MinimumCyclesPerQuantum;
146 UINT32 MaximumCyclesPerQuantum;
147 UINT32 MemoryUsageInBytes;
148 UINT32 CurrentLatencyInSamples;
149 UINT32 GlitchesSinceEngineStarted;
150 UINT32 ActiveSourceVoiceCount;
151 UINT32 TotalSourceVoiceCount;
152 UINT32 ActiveSubmixVoiceCount;
153 UINT32 ActiveResamplerCount;
154 UINT32 ActiveMatrixMixCount;
155 UINT32 ActiveXmaSourceVoices;
156 UINT32 ActiveXmaStreams;
157} XAUDIO2_PERFORMANCE_DATA;
158typedef enum XAUDIO2_DEVICE_ROLE {
159 NotDefaultDevice = 0x0,
160 DefaultConsoleDevice = 0x1,
161 DefaultMultimediaDevice = 0x2,
162 DefaultCommunicationsDevice = 0x4,
163 DefaultGameDevice = 0x8,
164 GlobalDefaultDevice = 0xf,
165 InvalidDeviceRole = ~GlobalDefaultDevice
166} XAUDIO2_DEVICE_ROLE;
167typedef struct XAUDIO2_VOICE_DETAILS {
168 UINT32 CreationFlags;
169 UINT32 ActiveFlags;
170 UINT32 InputChannels;
171 UINT32 InputSampleRate;
172} XAUDIO2_VOICE_DETAILS;
173typedef struct XAUDIO2_SEND_DESCRIPTOR {
174 UINT32 Flags;
175 IXAudio2Voice *pOutputVoice;
176} XAUDIO2_SEND_DESCRIPTOR;
177typedef struct XAUDIO2_VOICE_SENDS {
178 UINT32 SendCount;
179 XAUDIO2_SEND_DESCRIPTOR *pSends;
180} XAUDIO2_VOICE_SENDS;
181typedef struct XAUDIO2_EFFECT_DESCRIPTOR {
182 IUnknown *pEffect;
183 WINBOOL InitialState;
184 UINT32 OutputChannels;
185} XAUDIO2_EFFECT_DESCRIPTOR;
186typedef struct XAUDIO2_EFFECT_CHAIN {
187 UINT32 EffectCount;
188 XAUDIO2_EFFECT_DESCRIPTOR *pEffectDescriptors;
189} XAUDIO2_EFFECT_CHAIN;
190#define XAUDIO2_MAX_BUFFER_BYTES (0x80000000)
191
192#define XAUDIO2_MAX_QUEUED_BUFFERS (64)
193
194#define XAUDIO2_MAX_BUFFERS_SYSTEM (2)
195
196#define XAUDIO2_MAX_AUDIO_CHANNELS (64)
197
198#define XAUDIO2_MIN_SAMPLE_RATE (1000)
199
200#define XAUDIO2_MAX_SAMPLE_RATE (200000)
201
202#define XAUDIO2_MAX_VOLUME_LEVEL (16777216.0000000)
203
204#define XAUDIO2_MIN_FREQ_RATIO (1 / 1024.00000000000)
205
206#define XAUDIO2_MAX_FREQ_RATIO (1024.00000000000)
207
208#define XAUDIO2_DEFAULT_FREQ_RATIO (2.00000000000000)
209
210#define XAUDIO2_MAX_FILTER_ONEOVERQ (1.50000000000000)
211
212#define XAUDIO2_MAX_FILTER_FREQUENCY (1.00000000000000)
213
214#define XAUDIO2_MAX_LOOP_COUNT (254)
215
216#define XAUDIO2_COMMIT_NOW (0)
217
218#define XAUDIO2_COMMIT_ALL (0)
219
220#define XAUDIO2_INVALID_OPSET (0xffffffff)
221
222#define XAUDIO2_NO_LOOP_REGION (0)
223
224#define XAUDIO2_LOOP_INFINITE (255)
225
226#define XAUDIO2_DEFAULT_CHANNELS (0)
227
228#define XAUDIO2_DEFAULT_SAMPLERATE (0)
229
230/*****************************************************************************
231 * IXAudio2EngineCallback interface
232 */
233#ifndef __IXAudio2EngineCallback_INTERFACE_DEFINED__
234#define __IXAudio2EngineCallback_INTERFACE_DEFINED__
235
236#if defined(__cplusplus) && !defined(CINTERFACE)
237interface IXAudio2EngineCallback
238{
239
240 BEGIN_INTERFACE
241
242 virtual void STDMETHODCALLTYPE OnProcessingPassStart(
243 ) = 0;
244
245 virtual void STDMETHODCALLTYPE OnProcessingPassEnd(
246 ) = 0;
247
248 virtual void STDMETHODCALLTYPE OnCriticalError(
249 HRESULT Error) = 0;
250
251 END_INTERFACE
252
253};
254#else
255typedef struct IXAudio2EngineCallbackVtbl {
256 BEGIN_INTERFACE
257
258 /*** IXAudio2EngineCallback methods ***/
259 void (STDMETHODCALLTYPE *OnProcessingPassStart)(
260 IXAudio2EngineCallback *This);
261
262 void (STDMETHODCALLTYPE *OnProcessingPassEnd)(
263 IXAudio2EngineCallback *This);
264
265 void (STDMETHODCALLTYPE *OnCriticalError)(
266 IXAudio2EngineCallback *This,
267 HRESULT Error);
268
269 END_INTERFACE
270} IXAudio2EngineCallbackVtbl;
271
272interface IXAudio2EngineCallback {
273 CONST_VTBL IXAudio2EngineCallbackVtbl* lpVtbl;
274};
275
276#ifdef COBJMACROS
277#ifndef WIDL_C_INLINE_WRAPPERS
278/*** IXAudio2EngineCallback methods ***/
279#define IXAudio2EngineCallback_OnProcessingPassStart(This) (This)->lpVtbl->OnProcessingPassStart(This)
280#define IXAudio2EngineCallback_OnProcessingPassEnd(This) (This)->lpVtbl->OnProcessingPassEnd(This)
281#define IXAudio2EngineCallback_OnCriticalError(This,Error) (This)->lpVtbl->OnCriticalError(This,Error)
282#else
283/*** IXAudio2EngineCallback methods ***/
284static inline void IXAudio2EngineCallback_OnProcessingPassStart(IXAudio2EngineCallback* This) {
285 This->lpVtbl->OnProcessingPassStart(This);
286}
287static inline void IXAudio2EngineCallback_OnProcessingPassEnd(IXAudio2EngineCallback* This) {
288 This->lpVtbl->OnProcessingPassEnd(This);
289}
290static inline void IXAudio2EngineCallback_OnCriticalError(IXAudio2EngineCallback* This,HRESULT Error) {
291 This->lpVtbl->OnCriticalError(This,Error);
292}
293#endif
294#endif
295
296#endif
297
298
299#endif /* __IXAudio2EngineCallback_INTERFACE_DEFINED__ */
300
301typedef enum XAUDIO2_FILTER_TYPE {
302 LowPassFilter = 0,
303 BandPassFilter = 1,
304 HighPassFilter = 2,
305 NotchFilter = 3
306} XAUDIO2_FILTER_TYPE;
307typedef struct XAUDIO2_FILTER_PARAMETERS {
308 XAUDIO2_FILTER_TYPE Type;
309 float Frequency;
310 float OneOverQ;
311} XAUDIO2_FILTER_PARAMETERS;
312/*****************************************************************************
313 * IXAudio2Voice interface
314 */
315#ifndef __IXAudio2Voice_INTERFACE_DEFINED__
316#define __IXAudio2Voice_INTERFACE_DEFINED__
317
318#if defined(__cplusplus) && !defined(CINTERFACE)
319interface IXAudio2Voice
320{
321
322 BEGIN_INTERFACE
323
324 virtual void STDMETHODCALLTYPE GetVoiceDetails(
325 XAUDIO2_VOICE_DETAILS *pVoiceDetails) = 0;
326
327 virtual HRESULT STDMETHODCALLTYPE SetOutputVoices(
328 const XAUDIO2_VOICE_SENDS *pSendList) = 0;
329
330 virtual HRESULT STDMETHODCALLTYPE SetEffectChain(
331 const XAUDIO2_EFFECT_CHAIN *pEffectChain) = 0;
332
333 virtual HRESULT STDMETHODCALLTYPE EnableEffect(
334 UINT32 EffectIndex,
335 UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
336
337 virtual HRESULT STDMETHODCALLTYPE DisableEffect(
338 UINT32 EffectIndex,
339 UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
340
341 virtual void STDMETHODCALLTYPE GetEffectState(
342 UINT32 EffectIndex,
343 WINBOOL *pEnabled) = 0;
344
345 virtual HRESULT STDMETHODCALLTYPE SetEffectParameters(
346 UINT32 EffectIndex,
347 const void *pParameters,
348 UINT32 ParametersByteSize,
349 UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
350
351 virtual HRESULT STDMETHODCALLTYPE GetEffectParameters(
352 UINT32 EffectIndex,
353 void *pParameters,
354 UINT32 ParametersByteSize) = 0;
355
356 virtual HRESULT STDMETHODCALLTYPE SetFilterParameters(
357 const XAUDIO2_FILTER_PARAMETERS *pParameters,
358 UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
359
360 virtual void STDMETHODCALLTYPE GetFilterParameters(
361 XAUDIO2_FILTER_PARAMETERS *pParameters) = 0;
362
363 virtual HRESULT STDMETHODCALLTYPE SetOutputFilterParameters(
364 IXAudio2Voice *pDestinationVoice,
365 const XAUDIO2_FILTER_PARAMETERS *pParameters,
366 UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
367
368 virtual void STDMETHODCALLTYPE GetOutputFilterParameters(
369 IXAudio2Voice *pDestinationVoice,
370 XAUDIO2_FILTER_PARAMETERS *pParameters) = 0;
371
372 virtual HRESULT STDMETHODCALLTYPE SetVolume(
373 float Volume,
374 UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
375
376 virtual void STDMETHODCALLTYPE GetVolume(
377 float *pVolume) = 0;
378
379 virtual HRESULT STDMETHODCALLTYPE SetChannelVolumes(
380 UINT32 Channels,
381 const float *pVolumes,
382 UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
383
384 virtual void STDMETHODCALLTYPE GetChannelVolumes(
385 UINT32 Channels,
386 float *pVolumes) = 0;
387
388 virtual HRESULT STDMETHODCALLTYPE SetOutputMatrix(
389 IXAudio2Voice *pDestinationVoice,
390 UINT32 SourceChannels,
391 UINT32 DestinationChannels,
392 const float *pLevelMatrix,
393 UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
394
395 virtual void STDMETHODCALLTYPE GetOutputMatrix(
396 IXAudio2Voice *pDestinationVoice,
397 UINT32 SourceChannels,
398 UINT32 DestinationChannels,
399 float *pLevelMatrix) = 0;
400
401 virtual void STDMETHODCALLTYPE DestroyVoice(
402 ) = 0;
403
404 END_INTERFACE
405
406};
407#else
408typedef struct IXAudio2VoiceVtbl {
409 BEGIN_INTERFACE
410
411 /*** IXAudio2Voice methods ***/
412 void (STDMETHODCALLTYPE *GetVoiceDetails)(
413 IXAudio2Voice *This,
414 XAUDIO2_VOICE_DETAILS *pVoiceDetails);
415
416 HRESULT (STDMETHODCALLTYPE *SetOutputVoices)(
417 IXAudio2Voice *This,
418 const XAUDIO2_VOICE_SENDS *pSendList);
419
420 HRESULT (STDMETHODCALLTYPE *SetEffectChain)(
421 IXAudio2Voice *This,
422 const XAUDIO2_EFFECT_CHAIN *pEffectChain);
423
424 HRESULT (STDMETHODCALLTYPE *EnableEffect)(
425 IXAudio2Voice *This,
426 UINT32 EffectIndex,
427 UINT32 OperationSet);
428
429 HRESULT (STDMETHODCALLTYPE *DisableEffect)(
430 IXAudio2Voice *This,
431 UINT32 EffectIndex,
432 UINT32 OperationSet);
433
434 void (STDMETHODCALLTYPE *GetEffectState)(
435 IXAudio2Voice *This,
436 UINT32 EffectIndex,
437 WINBOOL *pEnabled);
438
439 HRESULT (STDMETHODCALLTYPE *SetEffectParameters)(
440 IXAudio2Voice *This,
441 UINT32 EffectIndex,
442 const void *pParameters,
443 UINT32 ParametersByteSize,
444 UINT32 OperationSet);
445
446 HRESULT (STDMETHODCALLTYPE *GetEffectParameters)(
447 IXAudio2Voice *This,
448 UINT32 EffectIndex,
449 void *pParameters,
450 UINT32 ParametersByteSize);
451
452 HRESULT (STDMETHODCALLTYPE *SetFilterParameters)(
453 IXAudio2Voice *This,
454 const XAUDIO2_FILTER_PARAMETERS *pParameters,
455 UINT32 OperationSet);
456
457 void (STDMETHODCALLTYPE *GetFilterParameters)(
458 IXAudio2Voice *This,
459 XAUDIO2_FILTER_PARAMETERS *pParameters);
460
461 HRESULT (STDMETHODCALLTYPE *SetOutputFilterParameters)(
462 IXAudio2Voice *This,
463 IXAudio2Voice *pDestinationVoice,
464 const XAUDIO2_FILTER_PARAMETERS *pParameters,
465 UINT32 OperationSet);
466
467 void (STDMETHODCALLTYPE *GetOutputFilterParameters)(
468 IXAudio2Voice *This,
469 IXAudio2Voice *pDestinationVoice,
470 XAUDIO2_FILTER_PARAMETERS *pParameters);
471
472 HRESULT (STDMETHODCALLTYPE *SetVolume)(
473 IXAudio2Voice *This,
474 float Volume,
475 UINT32 OperationSet);
476
477 void (STDMETHODCALLTYPE *GetVolume)(
478 IXAudio2Voice *This,
479 float *pVolume);
480
481 HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)(
482 IXAudio2Voice *This,
483 UINT32 Channels,
484 const float *pVolumes,
485 UINT32 OperationSet);
486
487 void (STDMETHODCALLTYPE *GetChannelVolumes)(
488 IXAudio2Voice *This,
489 UINT32 Channels,
490 float *pVolumes);
491
492 HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)(
493 IXAudio2Voice *This,
494 IXAudio2Voice *pDestinationVoice,
495 UINT32 SourceChannels,
496 UINT32 DestinationChannels,
497 const float *pLevelMatrix,
498 UINT32 OperationSet);
499
500 void (STDMETHODCALLTYPE *GetOutputMatrix)(
501 IXAudio2Voice *This,
502 IXAudio2Voice *pDestinationVoice,
503 UINT32 SourceChannels,
504 UINT32 DestinationChannels,
505 float *pLevelMatrix);
506
507 void (STDMETHODCALLTYPE *DestroyVoice)(
508 IXAudio2Voice *This);
509
510 END_INTERFACE
511} IXAudio2VoiceVtbl;
512
513interface IXAudio2Voice {
514 CONST_VTBL IXAudio2VoiceVtbl* lpVtbl;
515};
516
517#ifdef COBJMACROS
518#ifndef WIDL_C_INLINE_WRAPPERS
519/*** IXAudio2Voice methods ***/
520#define IXAudio2Voice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails)
521#define IXAudio2Voice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList)
522#define IXAudio2Voice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain)
523#define IXAudio2Voice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet)
524#define IXAudio2Voice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet)
525#define IXAudio2Voice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled)
526#define IXAudio2Voice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet)
527#define IXAudio2Voice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize)
528#define IXAudio2Voice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet)
529#define IXAudio2Voice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters)
530#define IXAudio2Voice_SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) (This)->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet)
531#define IXAudio2Voice_GetOutputFilterParameters(This,pDestinationVoice,pParameters) (This)->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters)
532#define IXAudio2Voice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet)
533#define IXAudio2Voice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume)
534#define IXAudio2Voice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet)
535#define IXAudio2Voice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes)
536#define IXAudio2Voice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet)
537#define IXAudio2Voice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix)
538#define IXAudio2Voice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This)
539#else
540/*** IXAudio2Voice methods ***/
541static inline void IXAudio2Voice_GetVoiceDetails(IXAudio2Voice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) {
542 This->lpVtbl->GetVoiceDetails(This,pVoiceDetails);
543}
544static inline HRESULT IXAudio2Voice_SetOutputVoices(IXAudio2Voice* This,const XAUDIO2_VOICE_SENDS *pSendList) {
545 return This->lpVtbl->SetOutputVoices(This,pSendList);
546}
547static inline HRESULT IXAudio2Voice_SetEffectChain(IXAudio2Voice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
548 return This->lpVtbl->SetEffectChain(This,pEffectChain);
549}
550static inline HRESULT IXAudio2Voice_EnableEffect(IXAudio2Voice* This,UINT32 EffectIndex,UINT32 OperationSet) {
551 return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet);
552}
553static inline HRESULT IXAudio2Voice_DisableEffect(IXAudio2Voice* This,UINT32 EffectIndex,UINT32 OperationSet) {
554 return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet);
555}
556static inline void IXAudio2Voice_GetEffectState(IXAudio2Voice* This,UINT32 EffectIndex,WINBOOL *pEnabled) {
557 This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled);
558}
559static inline HRESULT IXAudio2Voice_SetEffectParameters(IXAudio2Voice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) {
560 return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet);
561}
562static inline HRESULT IXAudio2Voice_GetEffectParameters(IXAudio2Voice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) {
563 return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize);
564}
565static inline HRESULT IXAudio2Voice_SetFilterParameters(IXAudio2Voice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
566 return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet);
567}
568static inline void IXAudio2Voice_GetFilterParameters(IXAudio2Voice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) {
569 This->lpVtbl->GetFilterParameters(This,pParameters);
570}
571static inline HRESULT IXAudio2Voice_SetOutputFilterParameters(IXAudio2Voice* This,IXAudio2Voice *pDestinationVoice,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
572 return This->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet);
573}
574static inline void IXAudio2Voice_GetOutputFilterParameters(IXAudio2Voice* This,IXAudio2Voice *pDestinationVoice,XAUDIO2_FILTER_PARAMETERS *pParameters) {
575 This->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters);
576}
577static inline HRESULT IXAudio2Voice_SetVolume(IXAudio2Voice* This,float Volume,UINT32 OperationSet) {
578 return This->lpVtbl->SetVolume(This,Volume,OperationSet);
579}
580static inline void IXAudio2Voice_GetVolume(IXAudio2Voice* This,float *pVolume) {
581 This->lpVtbl->GetVolume(This,pVolume);
582}
583static inline HRESULT IXAudio2Voice_SetChannelVolumes(IXAudio2Voice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) {
584 return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet);
585}
586static inline void IXAudio2Voice_GetChannelVolumes(IXAudio2Voice* This,UINT32 Channels,float *pVolumes) {
587 This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes);
588}
589static inline HRESULT IXAudio2Voice_SetOutputMatrix(IXAudio2Voice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) {
590 return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet);
591}
592static inline void IXAudio2Voice_GetOutputMatrix(IXAudio2Voice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) {
593 This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix);
594}
595static inline void IXAudio2Voice_DestroyVoice(IXAudio2Voice* This) {
596 This->lpVtbl->DestroyVoice(This);
597}
598#endif
599#endif
600
601#endif
602
603
604#endif /* __IXAudio2Voice_INTERFACE_DEFINED__ */
605
606typedef struct XAUDIO2_BUFFER {
607 UINT32 Flags;
608 UINT32 AudioBytes;
609 const BYTE *pAudioData;
610 UINT32 PlayBegin;
611 UINT32 PlayLength;
612 UINT32 LoopBegin;
613 UINT32 LoopLength;
614 UINT32 LoopCount;
615 void *pContext;
616} XAUDIO2_BUFFER;
617typedef struct XAUDIO2_BUFFER_WMA {
618 const UINT32 *pDecodedPacketCumulativeBytes;
619 UINT32 PacketCount;
620} XAUDIO2_BUFFER_WMA;
621typedef struct XAUDIO2_VOICE_STATE {
622 void *pCurrentBufferContext;
623 UINT32 BuffersQueued;
624 UINT64 SamplesPlayed;
625} XAUDIO2_VOICE_STATE;
626/*****************************************************************************
627 * IXAudio2SourceVoice interface
628 */
629#ifndef __IXAudio2SourceVoice_INTERFACE_DEFINED__
630#define __IXAudio2SourceVoice_INTERFACE_DEFINED__
631
632#if defined(__cplusplus) && !defined(CINTERFACE)
633interface IXAudio2SourceVoice : public IXAudio2Voice
634{
635 virtual HRESULT STDMETHODCALLTYPE Start(
636 UINT32 Flags = 0,
637 UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
638
639 virtual HRESULT STDMETHODCALLTYPE Stop(
640 UINT32 Flags = 0,
641 UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
642
643 virtual HRESULT STDMETHODCALLTYPE SubmitSourceBuffer(
644 const XAUDIO2_BUFFER *pBuffer,
645 const XAUDIO2_BUFFER_WMA *pBufferWMA = 0) = 0;
646
647 virtual HRESULT STDMETHODCALLTYPE FlushSourceBuffers(
648 ) = 0;
649
650 virtual HRESULT STDMETHODCALLTYPE Discontinuity(
651 ) = 0;
652
653 virtual HRESULT STDMETHODCALLTYPE ExitLoop(
654 UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
655
656 virtual void STDMETHODCALLTYPE GetState(
657 XAUDIO2_VOICE_STATE *pVoiceState,
658 UINT32 Flags = 0) = 0;
659
660 virtual HRESULT STDMETHODCALLTYPE SetFrequencyRatio(
661 float Ratio,
662 UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
663
664 virtual void STDMETHODCALLTYPE GetFrequencyRatio(
665 float *pRatio) = 0;
666
667 virtual HRESULT STDMETHODCALLTYPE SetSourceSampleRate(
668 UINT32 NewSourceSampleRate) = 0;
669
670};
671#else
672typedef struct IXAudio2SourceVoiceVtbl {
673 BEGIN_INTERFACE
674
675 /*** IXAudio2Voice methods ***/
676 void (STDMETHODCALLTYPE *GetVoiceDetails)(
677 IXAudio2SourceVoice *This,
678 XAUDIO2_VOICE_DETAILS *pVoiceDetails);
679
680 HRESULT (STDMETHODCALLTYPE *SetOutputVoices)(
681 IXAudio2SourceVoice *This,
682 const XAUDIO2_VOICE_SENDS *pSendList);
683
684 HRESULT (STDMETHODCALLTYPE *SetEffectChain)(
685 IXAudio2SourceVoice *This,
686 const XAUDIO2_EFFECT_CHAIN *pEffectChain);
687
688 HRESULT (STDMETHODCALLTYPE *EnableEffect)(
689 IXAudio2SourceVoice *This,
690 UINT32 EffectIndex,
691 UINT32 OperationSet);
692
693 HRESULT (STDMETHODCALLTYPE *DisableEffect)(
694 IXAudio2SourceVoice *This,
695 UINT32 EffectIndex,
696 UINT32 OperationSet);
697
698 void (STDMETHODCALLTYPE *GetEffectState)(
699 IXAudio2SourceVoice *This,
700 UINT32 EffectIndex,
701 WINBOOL *pEnabled);
702
703 HRESULT (STDMETHODCALLTYPE *SetEffectParameters)(
704 IXAudio2SourceVoice *This,
705 UINT32 EffectIndex,
706 const void *pParameters,
707 UINT32 ParametersByteSize,
708 UINT32 OperationSet);
709
710 HRESULT (STDMETHODCALLTYPE *GetEffectParameters)(
711 IXAudio2SourceVoice *This,
712 UINT32 EffectIndex,
713 void *pParameters,
714 UINT32 ParametersByteSize);
715
716 HRESULT (STDMETHODCALLTYPE *SetFilterParameters)(
717 IXAudio2SourceVoice *This,
718 const XAUDIO2_FILTER_PARAMETERS *pParameters,
719 UINT32 OperationSet);
720
721 void (STDMETHODCALLTYPE *GetFilterParameters)(
722 IXAudio2SourceVoice *This,
723 XAUDIO2_FILTER_PARAMETERS *pParameters);
724
725 HRESULT (STDMETHODCALLTYPE *SetOutputFilterParameters)(
726 IXAudio2SourceVoice *This,
727 IXAudio2Voice *pDestinationVoice,
728 const XAUDIO2_FILTER_PARAMETERS *pParameters,
729 UINT32 OperationSet);
730
731 void (STDMETHODCALLTYPE *GetOutputFilterParameters)(
732 IXAudio2SourceVoice *This,
733 IXAudio2Voice *pDestinationVoice,
734 XAUDIO2_FILTER_PARAMETERS *pParameters);
735
736 HRESULT (STDMETHODCALLTYPE *SetVolume)(
737 IXAudio2SourceVoice *This,
738 float Volume,
739 UINT32 OperationSet);
740
741 void (STDMETHODCALLTYPE *GetVolume)(
742 IXAudio2SourceVoice *This,
743 float *pVolume);
744
745 HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)(
746 IXAudio2SourceVoice *This,
747 UINT32 Channels,
748 const float *pVolumes,
749 UINT32 OperationSet);
750
751 void (STDMETHODCALLTYPE *GetChannelVolumes)(
752 IXAudio2SourceVoice *This,
753 UINT32 Channels,
754 float *pVolumes);
755
756 HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)(
757 IXAudio2SourceVoice *This,
758 IXAudio2Voice *pDestinationVoice,
759 UINT32 SourceChannels,
760 UINT32 DestinationChannels,
761 const float *pLevelMatrix,
762 UINT32 OperationSet);
763
764 void (STDMETHODCALLTYPE *GetOutputMatrix)(
765 IXAudio2SourceVoice *This,
766 IXAudio2Voice *pDestinationVoice,
767 UINT32 SourceChannels,
768 UINT32 DestinationChannels,
769 float *pLevelMatrix);
770
771 void (STDMETHODCALLTYPE *DestroyVoice)(
772 IXAudio2SourceVoice *This);
773
774 /*** IXAudio2SourceVoice methods ***/
775 HRESULT (STDMETHODCALLTYPE *Start)(
776 IXAudio2SourceVoice *This,
777 UINT32 Flags,
778 UINT32 OperationSet);
779
780 HRESULT (STDMETHODCALLTYPE *Stop)(
781 IXAudio2SourceVoice *This,
782 UINT32 Flags,
783 UINT32 OperationSet);
784
785 HRESULT (STDMETHODCALLTYPE *SubmitSourceBuffer)(
786 IXAudio2SourceVoice *This,
787 const XAUDIO2_BUFFER *pBuffer,
788 const XAUDIO2_BUFFER_WMA *pBufferWMA);
789
790 HRESULT (STDMETHODCALLTYPE *FlushSourceBuffers)(
791 IXAudio2SourceVoice *This);
792
793 HRESULT (STDMETHODCALLTYPE *Discontinuity)(
794 IXAudio2SourceVoice *This);
795
796 HRESULT (STDMETHODCALLTYPE *ExitLoop)(
797 IXAudio2SourceVoice *This,
798 UINT32 OperationSet);
799
800 void (STDMETHODCALLTYPE *GetState)(
801 IXAudio2SourceVoice *This,
802 XAUDIO2_VOICE_STATE *pVoiceState,
803 UINT32 Flags);
804
805 HRESULT (STDMETHODCALLTYPE *SetFrequencyRatio)(
806 IXAudio2SourceVoice *This,
807 float Ratio,
808 UINT32 OperationSet);
809
810 void (STDMETHODCALLTYPE *GetFrequencyRatio)(
811 IXAudio2SourceVoice *This,
812 float *pRatio);
813
814 HRESULT (STDMETHODCALLTYPE *SetSourceSampleRate)(
815 IXAudio2SourceVoice *This,
816 UINT32 NewSourceSampleRate);
817
818 END_INTERFACE
819} IXAudio2SourceVoiceVtbl;
820
821interface IXAudio2SourceVoice {
822 CONST_VTBL IXAudio2SourceVoiceVtbl* lpVtbl;
823};
824
825#ifdef COBJMACROS
826#ifndef WIDL_C_INLINE_WRAPPERS
827/*** IXAudio2Voice methods ***/
828#define IXAudio2SourceVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails)
829#define IXAudio2SourceVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList)
830#define IXAudio2SourceVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain)
831#define IXAudio2SourceVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet)
832#define IXAudio2SourceVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet)
833#define IXAudio2SourceVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled)
834#define IXAudio2SourceVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet)
835#define IXAudio2SourceVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize)
836#define IXAudio2SourceVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet)
837#define IXAudio2SourceVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters)
838#define IXAudio2SourceVoice_SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) (This)->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet)
839#define IXAudio2SourceVoice_GetOutputFilterParameters(This,pDestinationVoice,pParameters) (This)->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters)
840#define IXAudio2SourceVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet)
841#define IXAudio2SourceVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume)
842#define IXAudio2SourceVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet)
843#define IXAudio2SourceVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes)
844#define IXAudio2SourceVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet)
845#define IXAudio2SourceVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix)
846#define IXAudio2SourceVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This)
847/*** IXAudio2SourceVoice methods ***/
848#define IXAudio2SourceVoice_Start(This,Flags,OperationSet) (This)->lpVtbl->Start(This,Flags,OperationSet)
849#define IXAudio2SourceVoice_Stop(This,Flags,OperationSet) (This)->lpVtbl->Stop(This,Flags,OperationSet)
850#define IXAudio2SourceVoice_SubmitSourceBuffer(This,pBuffer,pBufferWMA) (This)->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA)
851#define IXAudio2SourceVoice_FlushSourceBuffers(This) (This)->lpVtbl->FlushSourceBuffers(This)
852#define IXAudio2SourceVoice_Discontinuity(This) (This)->lpVtbl->Discontinuity(This)
853#define IXAudio2SourceVoice_ExitLoop(This,OperationSet) (This)->lpVtbl->ExitLoop(This,OperationSet)
854#define IXAudio2SourceVoice_GetState(This,pVoiceState,Flags) (This)->lpVtbl->GetState(This,pVoiceState,Flags)
855#define IXAudio2SourceVoice_SetFrequencyRatio(This,Ratio,OperationSet) (This)->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet)
856#define IXAudio2SourceVoice_GetFrequencyRatio(This,pRatio) (This)->lpVtbl->GetFrequencyRatio(This,pRatio)
857#define IXAudio2SourceVoice_SetSourceSampleRate(This,NewSourceSampleRate) (This)->lpVtbl->SetSourceSampleRate(This,NewSourceSampleRate)
858#else
859/*** IXAudio2Voice methods ***/
860static inline void IXAudio2SourceVoice_GetVoiceDetails(IXAudio2SourceVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) {
861 This->lpVtbl->GetVoiceDetails(This,pVoiceDetails);
862}
863static inline HRESULT IXAudio2SourceVoice_SetOutputVoices(IXAudio2SourceVoice* This,const XAUDIO2_VOICE_SENDS *pSendList) {
864 return This->lpVtbl->SetOutputVoices(This,pSendList);
865}
866static inline HRESULT IXAudio2SourceVoice_SetEffectChain(IXAudio2SourceVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
867 return This->lpVtbl->SetEffectChain(This,pEffectChain);
868}
869static inline HRESULT IXAudio2SourceVoice_EnableEffect(IXAudio2SourceVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
870 return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet);
871}
872static inline HRESULT IXAudio2SourceVoice_DisableEffect(IXAudio2SourceVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
873 return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet);
874}
875static inline void IXAudio2SourceVoice_GetEffectState(IXAudio2SourceVoice* This,UINT32 EffectIndex,WINBOOL *pEnabled) {
876 This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled);
877}
878static inline HRESULT IXAudio2SourceVoice_SetEffectParameters(IXAudio2SourceVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) {
879 return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet);
880}
881static inline HRESULT IXAudio2SourceVoice_GetEffectParameters(IXAudio2SourceVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) {
882 return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize);
883}
884static inline HRESULT IXAudio2SourceVoice_SetFilterParameters(IXAudio2SourceVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
885 return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet);
886}
887static inline void IXAudio2SourceVoice_GetFilterParameters(IXAudio2SourceVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) {
888 This->lpVtbl->GetFilterParameters(This,pParameters);
889}
890static inline HRESULT IXAudio2SourceVoice_SetOutputFilterParameters(IXAudio2SourceVoice* This,IXAudio2Voice *pDestinationVoice,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
891 return This->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet);
892}
893static inline void IXAudio2SourceVoice_GetOutputFilterParameters(IXAudio2SourceVoice* This,IXAudio2Voice *pDestinationVoice,XAUDIO2_FILTER_PARAMETERS *pParameters) {
894 This->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters);
895}
896static inline HRESULT IXAudio2SourceVoice_SetVolume(IXAudio2SourceVoice* This,float Volume,UINT32 OperationSet) {
897 return This->lpVtbl->SetVolume(This,Volume,OperationSet);
898}
899static inline void IXAudio2SourceVoice_GetVolume(IXAudio2SourceVoice* This,float *pVolume) {
900 This->lpVtbl->GetVolume(This,pVolume);
901}
902static inline HRESULT IXAudio2SourceVoice_SetChannelVolumes(IXAudio2SourceVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) {
903 return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet);
904}
905static inline void IXAudio2SourceVoice_GetChannelVolumes(IXAudio2SourceVoice* This,UINT32 Channels,float *pVolumes) {
906 This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes);
907}
908static inline HRESULT IXAudio2SourceVoice_SetOutputMatrix(IXAudio2SourceVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) {
909 return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet);
910}
911static inline void IXAudio2SourceVoice_GetOutputMatrix(IXAudio2SourceVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) {
912 This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix);
913}
914static inline void IXAudio2SourceVoice_DestroyVoice(IXAudio2SourceVoice* This) {
915 This->lpVtbl->DestroyVoice(This);
916}
917/*** IXAudio2SourceVoice methods ***/
918static inline HRESULT IXAudio2SourceVoice_Start(IXAudio2SourceVoice* This,UINT32 Flags,UINT32 OperationSet) {
919 return This->lpVtbl->Start(This,Flags,OperationSet);
920}
921static inline HRESULT IXAudio2SourceVoice_Stop(IXAudio2SourceVoice* This,UINT32 Flags,UINT32 OperationSet) {
922 return This->lpVtbl->Stop(This,Flags,OperationSet);
923}
924static inline HRESULT IXAudio2SourceVoice_SubmitSourceBuffer(IXAudio2SourceVoice* This,const XAUDIO2_BUFFER *pBuffer,const XAUDIO2_BUFFER_WMA *pBufferWMA) {
925 return This->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA);
926}
927static inline HRESULT IXAudio2SourceVoice_FlushSourceBuffers(IXAudio2SourceVoice* This) {
928 return This->lpVtbl->FlushSourceBuffers(This);
929}
930static inline HRESULT IXAudio2SourceVoice_Discontinuity(IXAudio2SourceVoice* This) {
931 return This->lpVtbl->Discontinuity(This);
932}
933static inline HRESULT IXAudio2SourceVoice_ExitLoop(IXAudio2SourceVoice* This,UINT32 OperationSet) {
934 return This->lpVtbl->ExitLoop(This,OperationSet);
935}
936static inline void IXAudio2SourceVoice_GetState(IXAudio2SourceVoice* This,XAUDIO2_VOICE_STATE *pVoiceState,UINT32 Flags) {
937 This->lpVtbl->GetState(This,pVoiceState,Flags);
938}
939static inline HRESULT IXAudio2SourceVoice_SetFrequencyRatio(IXAudio2SourceVoice* This,float Ratio,UINT32 OperationSet) {
940 return This->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet);
941}
942static inline void IXAudio2SourceVoice_GetFrequencyRatio(IXAudio2SourceVoice* This,float *pRatio) {
943 This->lpVtbl->GetFrequencyRatio(This,pRatio);
944}
945static inline HRESULT IXAudio2SourceVoice_SetSourceSampleRate(IXAudio2SourceVoice* This,UINT32 NewSourceSampleRate) {
946 return This->lpVtbl->SetSourceSampleRate(This,NewSourceSampleRate);
947}
948#endif
949#endif
950
951#endif
952
953
954#endif /* __IXAudio2SourceVoice_INTERFACE_DEFINED__ */
955
956/*****************************************************************************
957 * IXAudio2SubmixVoice interface
958 */
959#ifndef __IXAudio2SubmixVoice_INTERFACE_DEFINED__
960#define __IXAudio2SubmixVoice_INTERFACE_DEFINED__
961
962#if defined(__cplusplus) && !defined(CINTERFACE)
963interface IXAudio2SubmixVoice : public IXAudio2Voice
964{
965};
966#else
967typedef struct IXAudio2SubmixVoiceVtbl {
968 BEGIN_INTERFACE
969
970 /*** IXAudio2Voice methods ***/
971 void (STDMETHODCALLTYPE *GetVoiceDetails)(
972 IXAudio2SubmixVoice *This,
973 XAUDIO2_VOICE_DETAILS *pVoiceDetails);
974
975 HRESULT (STDMETHODCALLTYPE *SetOutputVoices)(
976 IXAudio2SubmixVoice *This,
977 const XAUDIO2_VOICE_SENDS *pSendList);
978
979 HRESULT (STDMETHODCALLTYPE *SetEffectChain)(
980 IXAudio2SubmixVoice *This,
981 const XAUDIO2_EFFECT_CHAIN *pEffectChain);
982
983 HRESULT (STDMETHODCALLTYPE *EnableEffect)(
984 IXAudio2SubmixVoice *This,
985 UINT32 EffectIndex,
986 UINT32 OperationSet);
987
988 HRESULT (STDMETHODCALLTYPE *DisableEffect)(
989 IXAudio2SubmixVoice *This,
990 UINT32 EffectIndex,
991 UINT32 OperationSet);
992
993 void (STDMETHODCALLTYPE *GetEffectState)(
994 IXAudio2SubmixVoice *This,
995 UINT32 EffectIndex,
996 WINBOOL *pEnabled);
997
998 HRESULT (STDMETHODCALLTYPE *SetEffectParameters)(
999 IXAudio2SubmixVoice *This,
1000 UINT32 EffectIndex,
1001 const void *pParameters,
1002 UINT32 ParametersByteSize,
1003 UINT32 OperationSet);
1004
1005 HRESULT (STDMETHODCALLTYPE *GetEffectParameters)(
1006 IXAudio2SubmixVoice *This,
1007 UINT32 EffectIndex,
1008 void *pParameters,
1009 UINT32 ParametersByteSize);
1010
1011 HRESULT (STDMETHODCALLTYPE *SetFilterParameters)(
1012 IXAudio2SubmixVoice *This,
1013 const XAUDIO2_FILTER_PARAMETERS *pParameters,
1014 UINT32 OperationSet);
1015
1016 void (STDMETHODCALLTYPE *GetFilterParameters)(
1017 IXAudio2SubmixVoice *This,
1018 XAUDIO2_FILTER_PARAMETERS *pParameters);
1019
1020 HRESULT (STDMETHODCALLTYPE *SetOutputFilterParameters)(
1021 IXAudio2SubmixVoice *This,
1022 IXAudio2Voice *pDestinationVoice,
1023 const XAUDIO2_FILTER_PARAMETERS *pParameters,
1024 UINT32 OperationSet);
1025
1026 void (STDMETHODCALLTYPE *GetOutputFilterParameters)(
1027 IXAudio2SubmixVoice *This,
1028 IXAudio2Voice *pDestinationVoice,
1029 XAUDIO2_FILTER_PARAMETERS *pParameters);
1030
1031 HRESULT (STDMETHODCALLTYPE *SetVolume)(
1032 IXAudio2SubmixVoice *This,
1033 float Volume,
1034 UINT32 OperationSet);
1035
1036 void (STDMETHODCALLTYPE *GetVolume)(
1037 IXAudio2SubmixVoice *This,
1038 float *pVolume);
1039
1040 HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)(
1041 IXAudio2SubmixVoice *This,
1042 UINT32 Channels,
1043 const float *pVolumes,
1044 UINT32 OperationSet);
1045
1046 void (STDMETHODCALLTYPE *GetChannelVolumes)(
1047 IXAudio2SubmixVoice *This,
1048 UINT32 Channels,
1049 float *pVolumes);
1050
1051 HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)(
1052 IXAudio2SubmixVoice *This,
1053 IXAudio2Voice *pDestinationVoice,
1054 UINT32 SourceChannels,
1055 UINT32 DestinationChannels,
1056 const float *pLevelMatrix,
1057 UINT32 OperationSet);
1058
1059 void (STDMETHODCALLTYPE *GetOutputMatrix)(
1060 IXAudio2SubmixVoice *This,
1061 IXAudio2Voice *pDestinationVoice,
1062 UINT32 SourceChannels,
1063 UINT32 DestinationChannels,
1064 float *pLevelMatrix);
1065
1066 void (STDMETHODCALLTYPE *DestroyVoice)(
1067 IXAudio2SubmixVoice *This);
1068
1069 END_INTERFACE
1070} IXAudio2SubmixVoiceVtbl;
1071
1072interface IXAudio2SubmixVoice {
1073 CONST_VTBL IXAudio2SubmixVoiceVtbl* lpVtbl;
1074};
1075
1076#ifdef COBJMACROS
1077#ifndef WIDL_C_INLINE_WRAPPERS
1078/*** IXAudio2Voice methods ***/
1079#define IXAudio2SubmixVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails)
1080#define IXAudio2SubmixVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList)
1081#define IXAudio2SubmixVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain)
1082#define IXAudio2SubmixVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet)
1083#define IXAudio2SubmixVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet)
1084#define IXAudio2SubmixVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled)
1085#define IXAudio2SubmixVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet)
1086#define IXAudio2SubmixVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize)
1087#define IXAudio2SubmixVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet)
1088#define IXAudio2SubmixVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters)
1089#define IXAudio2SubmixVoice_SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) (This)->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet)
1090#define IXAudio2SubmixVoice_GetOutputFilterParameters(This,pDestinationVoice,pParameters) (This)->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters)
1091#define IXAudio2SubmixVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet)
1092#define IXAudio2SubmixVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume)
1093#define IXAudio2SubmixVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet)
1094#define IXAudio2SubmixVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes)
1095#define IXAudio2SubmixVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet)
1096#define IXAudio2SubmixVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix)
1097#define IXAudio2SubmixVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This)
1098#else
1099/*** IXAudio2Voice methods ***/
1100static inline void IXAudio2SubmixVoice_GetVoiceDetails(IXAudio2SubmixVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) {
1101 This->lpVtbl->GetVoiceDetails(This,pVoiceDetails);
1102}
1103static inline HRESULT IXAudio2SubmixVoice_SetOutputVoices(IXAudio2SubmixVoice* This,const XAUDIO2_VOICE_SENDS *pSendList) {
1104 return This->lpVtbl->SetOutputVoices(This,pSendList);
1105}
1106static inline HRESULT IXAudio2SubmixVoice_SetEffectChain(IXAudio2SubmixVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
1107 return This->lpVtbl->SetEffectChain(This,pEffectChain);
1108}
1109static inline HRESULT IXAudio2SubmixVoice_EnableEffect(IXAudio2SubmixVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
1110 return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet);
1111}
1112static inline HRESULT IXAudio2SubmixVoice_DisableEffect(IXAudio2SubmixVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
1113 return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet);
1114}
1115static inline void IXAudio2SubmixVoice_GetEffectState(IXAudio2SubmixVoice* This,UINT32 EffectIndex,WINBOOL *pEnabled) {
1116 This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled);
1117}
1118static inline HRESULT IXAudio2SubmixVoice_SetEffectParameters(IXAudio2SubmixVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) {
1119 return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet);
1120}
1121static inline HRESULT IXAudio2SubmixVoice_GetEffectParameters(IXAudio2SubmixVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) {
1122 return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize);
1123}
1124static inline HRESULT IXAudio2SubmixVoice_SetFilterParameters(IXAudio2SubmixVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
1125 return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet);
1126}
1127static inline void IXAudio2SubmixVoice_GetFilterParameters(IXAudio2SubmixVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) {
1128 This->lpVtbl->GetFilterParameters(This,pParameters);
1129}
1130static inline HRESULT IXAudio2SubmixVoice_SetOutputFilterParameters(IXAudio2SubmixVoice* This,IXAudio2Voice *pDestinationVoice,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
1131 return This->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet);
1132}
1133static inline void IXAudio2SubmixVoice_GetOutputFilterParameters(IXAudio2SubmixVoice* This,IXAudio2Voice *pDestinationVoice,XAUDIO2_FILTER_PARAMETERS *pParameters) {
1134 This->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters);
1135}
1136static inline HRESULT IXAudio2SubmixVoice_SetVolume(IXAudio2SubmixVoice* This,float Volume,UINT32 OperationSet) {
1137 return This->lpVtbl->SetVolume(This,Volume,OperationSet);
1138}
1139static inline void IXAudio2SubmixVoice_GetVolume(IXAudio2SubmixVoice* This,float *pVolume) {
1140 This->lpVtbl->GetVolume(This,pVolume);
1141}
1142static inline HRESULT IXAudio2SubmixVoice_SetChannelVolumes(IXAudio2SubmixVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) {
1143 return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet);
1144}
1145static inline void IXAudio2SubmixVoice_GetChannelVolumes(IXAudio2SubmixVoice* This,UINT32 Channels,float *pVolumes) {
1146 This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes);
1147}
1148static inline HRESULT IXAudio2SubmixVoice_SetOutputMatrix(IXAudio2SubmixVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) {
1149 return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet);
1150}
1151static inline void IXAudio2SubmixVoice_GetOutputMatrix(IXAudio2SubmixVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) {
1152 This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix);
1153}
1154static inline void IXAudio2SubmixVoice_DestroyVoice(IXAudio2SubmixVoice* This) {
1155 This->lpVtbl->DestroyVoice(This);
1156}
1157#endif
1158#endif
1159
1160#endif
1161
1162
1163#endif /* __IXAudio2SubmixVoice_INTERFACE_DEFINED__ */
1164
1165/*****************************************************************************
1166 * IXAudio2MasteringVoice interface
1167 */
1168#ifndef __IXAudio2MasteringVoice_INTERFACE_DEFINED__
1169#define __IXAudio2MasteringVoice_INTERFACE_DEFINED__
1170
1171#if defined(__cplusplus) && !defined(CINTERFACE)
1172interface IXAudio2MasteringVoice : public IXAudio2Voice
1173{
1174 virtual HRESULT STDMETHODCALLTYPE GetChannelMask(
1175 DWORD *pChannelMask) = 0;
1176
1177};
1178#else
1179typedef struct IXAudio2MasteringVoiceVtbl {
1180 BEGIN_INTERFACE
1181
1182 /*** IXAudio2Voice methods ***/
1183 void (STDMETHODCALLTYPE *GetVoiceDetails)(
1184 IXAudio2MasteringVoice *This,
1185 XAUDIO2_VOICE_DETAILS *pVoiceDetails);
1186
1187 HRESULT (STDMETHODCALLTYPE *SetOutputVoices)(
1188 IXAudio2MasteringVoice *This,
1189 const XAUDIO2_VOICE_SENDS *pSendList);
1190
1191 HRESULT (STDMETHODCALLTYPE *SetEffectChain)(
1192 IXAudio2MasteringVoice *This,
1193 const XAUDIO2_EFFECT_CHAIN *pEffectChain);
1194
1195 HRESULT (STDMETHODCALLTYPE *EnableEffect)(
1196 IXAudio2MasteringVoice *This,
1197 UINT32 EffectIndex,
1198 UINT32 OperationSet);
1199
1200 HRESULT (STDMETHODCALLTYPE *DisableEffect)(
1201 IXAudio2MasteringVoice *This,
1202 UINT32 EffectIndex,
1203 UINT32 OperationSet);
1204
1205 void (STDMETHODCALLTYPE *GetEffectState)(
1206 IXAudio2MasteringVoice *This,
1207 UINT32 EffectIndex,
1208 WINBOOL *pEnabled);
1209
1210 HRESULT (STDMETHODCALLTYPE *SetEffectParameters)(
1211 IXAudio2MasteringVoice *This,
1212 UINT32 EffectIndex,
1213 const void *pParameters,
1214 UINT32 ParametersByteSize,
1215 UINT32 OperationSet);
1216
1217 HRESULT (STDMETHODCALLTYPE *GetEffectParameters)(
1218 IXAudio2MasteringVoice *This,
1219 UINT32 EffectIndex,
1220 void *pParameters,
1221 UINT32 ParametersByteSize);
1222
1223 HRESULT (STDMETHODCALLTYPE *SetFilterParameters)(
1224 IXAudio2MasteringVoice *This,
1225 const XAUDIO2_FILTER_PARAMETERS *pParameters,
1226 UINT32 OperationSet);
1227
1228 void (STDMETHODCALLTYPE *GetFilterParameters)(
1229 IXAudio2MasteringVoice *This,
1230 XAUDIO2_FILTER_PARAMETERS *pParameters);
1231
1232 HRESULT (STDMETHODCALLTYPE *SetOutputFilterParameters)(
1233 IXAudio2MasteringVoice *This,
1234 IXAudio2Voice *pDestinationVoice,
1235 const XAUDIO2_FILTER_PARAMETERS *pParameters,
1236 UINT32 OperationSet);
1237
1238 void (STDMETHODCALLTYPE *GetOutputFilterParameters)(
1239 IXAudio2MasteringVoice *This,
1240 IXAudio2Voice *pDestinationVoice,
1241 XAUDIO2_FILTER_PARAMETERS *pParameters);
1242
1243 HRESULT (STDMETHODCALLTYPE *SetVolume)(
1244 IXAudio2MasteringVoice *This,
1245 float Volume,
1246 UINT32 OperationSet);
1247
1248 void (STDMETHODCALLTYPE *GetVolume)(
1249 IXAudio2MasteringVoice *This,
1250 float *pVolume);
1251
1252 HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)(
1253 IXAudio2MasteringVoice *This,
1254 UINT32 Channels,
1255 const float *pVolumes,
1256 UINT32 OperationSet);
1257
1258 void (STDMETHODCALLTYPE *GetChannelVolumes)(
1259 IXAudio2MasteringVoice *This,
1260 UINT32 Channels,
1261 float *pVolumes);
1262
1263 HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)(
1264 IXAudio2MasteringVoice *This,
1265 IXAudio2Voice *pDestinationVoice,
1266 UINT32 SourceChannels,
1267 UINT32 DestinationChannels,
1268 const float *pLevelMatrix,
1269 UINT32 OperationSet);
1270
1271 void (STDMETHODCALLTYPE *GetOutputMatrix)(
1272 IXAudio2MasteringVoice *This,
1273 IXAudio2Voice *pDestinationVoice,
1274 UINT32 SourceChannels,
1275 UINT32 DestinationChannels,
1276 float *pLevelMatrix);
1277
1278 void (STDMETHODCALLTYPE *DestroyVoice)(
1279 IXAudio2MasteringVoice *This);
1280
1281 /*** IXAudio2MasteringVoice methods ***/
1282 HRESULT (STDMETHODCALLTYPE *GetChannelMask)(
1283 IXAudio2MasteringVoice *This,
1284 DWORD *pChannelMask);
1285
1286 END_INTERFACE
1287} IXAudio2MasteringVoiceVtbl;
1288
1289interface IXAudio2MasteringVoice {
1290 CONST_VTBL IXAudio2MasteringVoiceVtbl* lpVtbl;
1291};
1292
1293#ifdef COBJMACROS
1294#ifndef WIDL_C_INLINE_WRAPPERS
1295/*** IXAudio2Voice methods ***/
1296#define IXAudio2MasteringVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails)
1297#define IXAudio2MasteringVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList)
1298#define IXAudio2MasteringVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain)
1299#define IXAudio2MasteringVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet)
1300#define IXAudio2MasteringVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet)
1301#define IXAudio2MasteringVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled)
1302#define IXAudio2MasteringVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet)
1303#define IXAudio2MasteringVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize)
1304#define IXAudio2MasteringVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet)
1305#define IXAudio2MasteringVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters)
1306#define IXAudio2MasteringVoice_SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) (This)->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet)
1307#define IXAudio2MasteringVoice_GetOutputFilterParameters(This,pDestinationVoice,pParameters) (This)->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters)
1308#define IXAudio2MasteringVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet)
1309#define IXAudio2MasteringVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume)
1310#define IXAudio2MasteringVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet)
1311#define IXAudio2MasteringVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes)
1312#define IXAudio2MasteringVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet)
1313#define IXAudio2MasteringVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix)
1314#define IXAudio2MasteringVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This)
1315/*** IXAudio2MasteringVoice methods ***/
1316#define IXAudio2MasteringVoice_GetChannelMask(This,pChannelMask) (This)->lpVtbl->GetChannelMask(This,pChannelMask)
1317#else
1318/*** IXAudio2Voice methods ***/
1319static inline void IXAudio2MasteringVoice_GetVoiceDetails(IXAudio2MasteringVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) {
1320 This->lpVtbl->GetVoiceDetails(This,pVoiceDetails);
1321}
1322static inline HRESULT IXAudio2MasteringVoice_SetOutputVoices(IXAudio2MasteringVoice* This,const XAUDIO2_VOICE_SENDS *pSendList) {
1323 return This->lpVtbl->SetOutputVoices(This,pSendList);
1324}
1325static inline HRESULT IXAudio2MasteringVoice_SetEffectChain(IXAudio2MasteringVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
1326 return This->lpVtbl->SetEffectChain(This,pEffectChain);
1327}
1328static inline HRESULT IXAudio2MasteringVoice_EnableEffect(IXAudio2MasteringVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
1329 return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet);
1330}
1331static inline HRESULT IXAudio2MasteringVoice_DisableEffect(IXAudio2MasteringVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
1332 return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet);
1333}
1334static inline void IXAudio2MasteringVoice_GetEffectState(IXAudio2MasteringVoice* This,UINT32 EffectIndex,WINBOOL *pEnabled) {
1335 This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled);
1336}
1337static inline HRESULT IXAudio2MasteringVoice_SetEffectParameters(IXAudio2MasteringVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) {
1338 return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet);
1339}
1340static inline HRESULT IXAudio2MasteringVoice_GetEffectParameters(IXAudio2MasteringVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) {
1341 return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize);
1342}
1343static inline HRESULT IXAudio2MasteringVoice_SetFilterParameters(IXAudio2MasteringVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
1344 return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet);
1345}
1346static inline void IXAudio2MasteringVoice_GetFilterParameters(IXAudio2MasteringVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) {
1347 This->lpVtbl->GetFilterParameters(This,pParameters);
1348}
1349static inline HRESULT IXAudio2MasteringVoice_SetOutputFilterParameters(IXAudio2MasteringVoice* This,IXAudio2Voice *pDestinationVoice,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
1350 return This->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet);
1351}
1352static inline void IXAudio2MasteringVoice_GetOutputFilterParameters(IXAudio2MasteringVoice* This,IXAudio2Voice *pDestinationVoice,XAUDIO2_FILTER_PARAMETERS *pParameters) {
1353 This->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters);
1354}
1355static inline HRESULT IXAudio2MasteringVoice_SetVolume(IXAudio2MasteringVoice* This,float Volume,UINT32 OperationSet) {
1356 return This->lpVtbl->SetVolume(This,Volume,OperationSet);
1357}
1358static inline void IXAudio2MasteringVoice_GetVolume(IXAudio2MasteringVoice* This,float *pVolume) {
1359 This->lpVtbl->GetVolume(This,pVolume);
1360}
1361static inline HRESULT IXAudio2MasteringVoice_SetChannelVolumes(IXAudio2MasteringVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) {
1362 return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet);
1363}
1364static inline void IXAudio2MasteringVoice_GetChannelVolumes(IXAudio2MasteringVoice* This,UINT32 Channels,float *pVolumes) {
1365 This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes);
1366}
1367static inline HRESULT IXAudio2MasteringVoice_SetOutputMatrix(IXAudio2MasteringVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) {
1368 return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet);
1369}
1370static inline void IXAudio2MasteringVoice_GetOutputMatrix(IXAudio2MasteringVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) {
1371 This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix);
1372}
1373static inline void IXAudio2MasteringVoice_DestroyVoice(IXAudio2MasteringVoice* This) {
1374 This->lpVtbl->DestroyVoice(This);
1375}
1376/*** IXAudio2MasteringVoice methods ***/
1377static inline HRESULT IXAudio2MasteringVoice_GetChannelMask(IXAudio2MasteringVoice* This,DWORD *pChannelMask) {
1378 return This->lpVtbl->GetChannelMask(This,pChannelMask);
1379}
1380#endif
1381#endif
1382
1383#endif
1384
1385
1386#endif /* __IXAudio2MasteringVoice_INTERFACE_DEFINED__ */
1387
1388/*****************************************************************************
1389 * IXAudio2VoiceCallback interface
1390 */
1391#ifndef __IXAudio2VoiceCallback_INTERFACE_DEFINED__
1392#define __IXAudio2VoiceCallback_INTERFACE_DEFINED__
1393
1394#if defined(__cplusplus) && !defined(CINTERFACE)
1395interface IXAudio2VoiceCallback
1396{
1397
1398 BEGIN_INTERFACE
1399
1400 virtual void STDMETHODCALLTYPE OnVoiceProcessingPassStart(
1401 UINT32 BytesRequired) = 0;
1402
1403 virtual void STDMETHODCALLTYPE OnVoiceProcessingPassEnd(
1404 ) = 0;
1405
1406 virtual void STDMETHODCALLTYPE OnStreamEnd(
1407 ) = 0;
1408
1409 virtual void STDMETHODCALLTYPE OnBufferStart(
1410 void *pBufferContext) = 0;
1411
1412 virtual void STDMETHODCALLTYPE OnBufferEnd(
1413 void *pBufferContext) = 0;
1414
1415 virtual void STDMETHODCALLTYPE OnLoopEnd(
1416 void *pBufferContext) = 0;
1417
1418 virtual void STDMETHODCALLTYPE OnVoiceError(
1419 void *pBuffercontext,
1420 HRESULT Error) = 0;
1421
1422 END_INTERFACE
1423
1424};
1425#else
1426typedef struct IXAudio2VoiceCallbackVtbl {
1427 BEGIN_INTERFACE
1428
1429 /*** IXAudio2VoiceCallback methods ***/
1430 void (STDMETHODCALLTYPE *OnVoiceProcessingPassStart)(
1431 IXAudio2VoiceCallback *This,
1432 UINT32 BytesRequired);
1433
1434 void (STDMETHODCALLTYPE *OnVoiceProcessingPassEnd)(
1435 IXAudio2VoiceCallback *This);
1436
1437 void (STDMETHODCALLTYPE *OnStreamEnd)(
1438 IXAudio2VoiceCallback *This);
1439
1440 void (STDMETHODCALLTYPE *OnBufferStart)(
1441 IXAudio2VoiceCallback *This,
1442 void *pBufferContext);
1443
1444 void (STDMETHODCALLTYPE *OnBufferEnd)(
1445 IXAudio2VoiceCallback *This,
1446 void *pBufferContext);
1447
1448 void (STDMETHODCALLTYPE *OnLoopEnd)(
1449 IXAudio2VoiceCallback *This,
1450 void *pBufferContext);
1451
1452 void (STDMETHODCALLTYPE *OnVoiceError)(
1453 IXAudio2VoiceCallback *This,
1454 void *pBuffercontext,
1455 HRESULT Error);
1456
1457 END_INTERFACE
1458} IXAudio2VoiceCallbackVtbl;
1459
1460interface IXAudio2VoiceCallback {
1461 CONST_VTBL IXAudio2VoiceCallbackVtbl* lpVtbl;
1462};
1463
1464#ifdef COBJMACROS
1465#ifndef WIDL_C_INLINE_WRAPPERS
1466/*** IXAudio2VoiceCallback methods ***/
1467#define IXAudio2VoiceCallback_OnVoiceProcessingPassStart(This,BytesRequired) (This)->lpVtbl->OnVoiceProcessingPassStart(This,BytesRequired)
1468#define IXAudio2VoiceCallback_OnVoiceProcessingPassEnd(This) (This)->lpVtbl->OnVoiceProcessingPassEnd(This)
1469#define IXAudio2VoiceCallback_OnStreamEnd(This) (This)->lpVtbl->OnStreamEnd(This)
1470#define IXAudio2VoiceCallback_OnBufferStart(This,pBufferContext) (This)->lpVtbl->OnBufferStart(This,pBufferContext)
1471#define IXAudio2VoiceCallback_OnBufferEnd(This,pBufferContext) (This)->lpVtbl->OnBufferEnd(This,pBufferContext)
1472#define IXAudio2VoiceCallback_OnLoopEnd(This,pBufferContext) (This)->lpVtbl->OnLoopEnd(This,pBufferContext)
1473#define IXAudio2VoiceCallback_OnVoiceError(This,pBuffercontext,Error) (This)->lpVtbl->OnVoiceError(This,pBuffercontext,Error)
1474#else
1475/*** IXAudio2VoiceCallback methods ***/
1476static inline void IXAudio2VoiceCallback_OnVoiceProcessingPassStart(IXAudio2VoiceCallback* This,UINT32 BytesRequired) {
1477 This->lpVtbl->OnVoiceProcessingPassStart(This,BytesRequired);
1478}
1479static inline void IXAudio2VoiceCallback_OnVoiceProcessingPassEnd(IXAudio2VoiceCallback* This) {
1480 This->lpVtbl->OnVoiceProcessingPassEnd(This);
1481}
1482static inline void IXAudio2VoiceCallback_OnStreamEnd(IXAudio2VoiceCallback* This) {
1483 This->lpVtbl->OnStreamEnd(This);
1484}
1485static inline void IXAudio2VoiceCallback_OnBufferStart(IXAudio2VoiceCallback* This,void *pBufferContext) {
1486 This->lpVtbl->OnBufferStart(This,pBufferContext);
1487}
1488static inline void IXAudio2VoiceCallback_OnBufferEnd(IXAudio2VoiceCallback* This,void *pBufferContext) {
1489 This->lpVtbl->OnBufferEnd(This,pBufferContext);
1490}
1491static inline void IXAudio2VoiceCallback_OnLoopEnd(IXAudio2VoiceCallback* This,void *pBufferContext) {
1492 This->lpVtbl->OnLoopEnd(This,pBufferContext);
1493}
1494static inline void IXAudio2VoiceCallback_OnVoiceError(IXAudio2VoiceCallback* This,void *pBuffercontext,HRESULT Error) {
1495 This->lpVtbl->OnVoiceError(This,pBuffercontext,Error);
1496}
1497#endif
1498#endif
1499
1500#endif
1501
1502
1503#endif /* __IXAudio2VoiceCallback_INTERFACE_DEFINED__ */
1504
1505typedef struct XAUDIO2_DEBUG_CONFIGURATION {
1506 UINT32 TraceMask;
1507 UINT32 BreakMask;
1508 WINBOOL LogThreadID;
1509 WINBOOL LogFileline;
1510 WINBOOL LogFunctionName;
1511 WINBOOL LogTiming;
1512} XAUDIO2_DEBUG_CONFIGURATION;
1513/*****************************************************************************
1514 * IXAudio2 interface
1515 */
1516#ifndef __IXAudio2_INTERFACE_DEFINED__
1517#define __IXAudio2_INTERFACE_DEFINED__
1518
1519DEFINE_GUID(IID_IXAudio2, 0x2b02e3cf, 0x2e0b, 0x4ec3, 0xbe,0x45, 0x1b,0x2a,0x3f,0xe7,0x21,0x0d);
1520#if defined(__cplusplus) && !defined(CINTERFACE)
1521MIDL_INTERFACE("2b02e3cf-2e0b-4ec3-be45-1b2a3fe7210d")
1522IXAudio2 : public IUnknown
1523{
1524 virtual HRESULT STDMETHODCALLTYPE RegisterForCallbacks(
1525 IXAudio2EngineCallback *pCallback) = 0;
1526
1527 virtual void STDMETHODCALLTYPE UnregisterForCallbacks(
1528 IXAudio2EngineCallback *pCallback) = 0;
1529
1530 virtual HRESULT STDMETHODCALLTYPE CreateSourceVoice(
1531 IXAudio2SourceVoice **ppSourceVoice,
1532 const WAVEFORMATEX *pSourceFormat,
1533 UINT32 Flags = 0,
1534 float MaxFrequencyRatio = XAUDIO2_DEFAULT_FREQ_RATIO,
1535 IXAudio2VoiceCallback *pCallback = 0,
1536 const XAUDIO2_VOICE_SENDS *pSendList = 0,
1537 const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0;
1538
1539 virtual HRESULT STDMETHODCALLTYPE CreateSubmixVoice(
1540 IXAudio2SubmixVoice **ppSubmixVoice,
1541 UINT32 InputChannels,
1542 UINT32 InputSampleRate,
1543 UINT32 Flags = 0,
1544 UINT32 ProcessingStage = 0,
1545 const XAUDIO2_VOICE_SENDS *pSendList = 0,
1546 const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0;
1547
1548 virtual HRESULT STDMETHODCALLTYPE CreateMasteringVoice(
1549 IXAudio2MasteringVoice **ppMasteringVoice,
1550 UINT32 InputChannels = XAUDIO2_DEFAULT_CHANNELS,
1551 UINT32 InputSampleRate = XAUDIO2_DEFAULT_SAMPLERATE,
1552 UINT32 Flags = 0,
1553 LPCWSTR DeviceId = 0,
1554 const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0,
1555 AUDIO_STREAM_CATEGORY category = AudioCategory_GameEffects) = 0;
1556
1557 virtual HRESULT STDMETHODCALLTYPE StartEngine(
1558 ) = 0;
1559
1560 virtual void STDMETHODCALLTYPE StopEngine(
1561 ) = 0;
1562
1563 virtual HRESULT STDMETHODCALLTYPE CommitChanges(
1564 UINT32 OperationSet) = 0;
1565
1566 virtual void STDMETHODCALLTYPE GetPerformanceData(
1567 XAUDIO2_PERFORMANCE_DATA *pPerfData) = 0;
1568
1569 virtual void STDMETHODCALLTYPE SetDebugConfiguration(
1570 const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,
1571 void *pReserved = 0) = 0;
1572
1573};
1574#ifdef __CRT_UUID_DECL
1575__CRT_UUID_DECL(IXAudio2, 0x2b02e3cf, 0x2e0b, 0x4ec3, 0xbe,0x45, 0x1b,0x2a,0x3f,0xe7,0x21,0x0d)
1576#endif
1577#else
1578typedef struct IXAudio2Vtbl {
1579 BEGIN_INTERFACE
1580
1581 /*** IUnknown methods ***/
1582 HRESULT (STDMETHODCALLTYPE *QueryInterface)(
1583 IXAudio2 *This,
1584 REFIID riid,
1585 void **ppvObject);
1586
1587 ULONG (STDMETHODCALLTYPE *AddRef)(
1588 IXAudio2 *This);
1589
1590 ULONG (STDMETHODCALLTYPE *Release)(
1591 IXAudio2 *This);
1592
1593 /*** IXAudio2 methods ***/
1594 HRESULT (STDMETHODCALLTYPE *RegisterForCallbacks)(
1595 IXAudio2 *This,
1596 IXAudio2EngineCallback *pCallback);
1597
1598 void (STDMETHODCALLTYPE *UnregisterForCallbacks)(
1599 IXAudio2 *This,
1600 IXAudio2EngineCallback *pCallback);
1601
1602 HRESULT (STDMETHODCALLTYPE *CreateSourceVoice)(
1603 IXAudio2 *This,
1604 IXAudio2SourceVoice **ppSourceVoice,
1605 const WAVEFORMATEX *pSourceFormat,
1606 UINT32 Flags,
1607 float MaxFrequencyRatio,
1608 IXAudio2VoiceCallback *pCallback,
1609 const XAUDIO2_VOICE_SENDS *pSendList,
1610 const XAUDIO2_EFFECT_CHAIN *pEffectChain);
1611
1612 HRESULT (STDMETHODCALLTYPE *CreateSubmixVoice)(
1613 IXAudio2 *This,
1614 IXAudio2SubmixVoice **ppSubmixVoice,
1615 UINT32 InputChannels,
1616 UINT32 InputSampleRate,
1617 UINT32 Flags,
1618 UINT32 ProcessingStage,
1619 const XAUDIO2_VOICE_SENDS *pSendList,
1620 const XAUDIO2_EFFECT_CHAIN *pEffectChain);
1621
1622 HRESULT (STDMETHODCALLTYPE *CreateMasteringVoice)(
1623 IXAudio2 *This,
1624 IXAudio2MasteringVoice **ppMasteringVoice,
1625 UINT32 InputChannels,
1626 UINT32 InputSampleRate,
1627 UINT32 Flags,
1628 LPCWSTR DeviceId,
1629 const XAUDIO2_EFFECT_CHAIN *pEffectChain,
1630 AUDIO_STREAM_CATEGORY category);
1631
1632 HRESULT (STDMETHODCALLTYPE *StartEngine)(
1633 IXAudio2 *This);
1634
1635 void (STDMETHODCALLTYPE *StopEngine)(
1636 IXAudio2 *This);
1637
1638 HRESULT (STDMETHODCALLTYPE *CommitChanges)(
1639 IXAudio2 *This,
1640 UINT32 OperationSet);
1641
1642 void (STDMETHODCALLTYPE *GetPerformanceData)(
1643 IXAudio2 *This,
1644 XAUDIO2_PERFORMANCE_DATA *pPerfData);
1645
1646 void (STDMETHODCALLTYPE *SetDebugConfiguration)(
1647 IXAudio2 *This,
1648 const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,
1649 void *pReserved);
1650
1651 END_INTERFACE
1652} IXAudio2Vtbl;
1653
1654interface IXAudio2 {
1655 CONST_VTBL IXAudio2Vtbl* lpVtbl;
1656};
1657
1658#ifdef COBJMACROS
1659#ifndef WIDL_C_INLINE_WRAPPERS
1660/*** IUnknown methods ***/
1661#define IXAudio2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
1662#define IXAudio2_AddRef(This) (This)->lpVtbl->AddRef(This)
1663#define IXAudio2_Release(This) (This)->lpVtbl->Release(This)
1664/*** IXAudio2 methods ***/
1665#define IXAudio2_RegisterForCallbacks(This,pCallback) (This)->lpVtbl->RegisterForCallbacks(This,pCallback)
1666#define IXAudio2_UnregisterForCallbacks(This,pCallback) (This)->lpVtbl->UnregisterForCallbacks(This,pCallback)
1667#define IXAudio2_CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) (This)->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain)
1668#define IXAudio2_CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain) (This)->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain)
1669#define IXAudio2_CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceId,pEffectChain,category) (This)->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceId,pEffectChain,category)
1670#define IXAudio2_StartEngine(This) (This)->lpVtbl->StartEngine(This)
1671#define IXAudio2_StopEngine(This) (This)->lpVtbl->StopEngine(This)
1672#define IXAudio2_CommitChanges(This,OperationSet) (This)->lpVtbl->CommitChanges(This,OperationSet)
1673#define IXAudio2_GetPerformanceData(This,pPerfData) (This)->lpVtbl->GetPerformanceData(This,pPerfData)
1674#define IXAudio2_SetDebugConfiguration(This,pDebugConfiguration,pReserved) (This)->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved)
1675#else
1676/*** IUnknown methods ***/
1677static inline HRESULT IXAudio2_QueryInterface(IXAudio2* This,REFIID riid,void **ppvObject) {
1678 return This->lpVtbl->QueryInterface(This,riid,ppvObject);
1679}
1680static inline ULONG IXAudio2_AddRef(IXAudio2* This) {
1681 return This->lpVtbl->AddRef(This);
1682}
1683static inline ULONG IXAudio2_Release(IXAudio2* This) {
1684 return This->lpVtbl->Release(This);
1685}
1686/*** IXAudio2 methods ***/
1687static inline HRESULT IXAudio2_RegisterForCallbacks(IXAudio2* This,IXAudio2EngineCallback *pCallback) {
1688 return This->lpVtbl->RegisterForCallbacks(This,pCallback);
1689}
1690static inline void IXAudio2_UnregisterForCallbacks(IXAudio2* This,IXAudio2EngineCallback *pCallback) {
1691 This->lpVtbl->UnregisterForCallbacks(This,pCallback);
1692}
1693static inline HRESULT IXAudio2_CreateSourceVoice(IXAudio2* This,IXAudio2SourceVoice **ppSourceVoice,const WAVEFORMATEX *pSourceFormat,UINT32 Flags,float MaxFrequencyRatio,IXAudio2VoiceCallback *pCallback,const XAUDIO2_VOICE_SENDS *pSendList,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
1694 return This->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain);
1695}
1696static inline HRESULT IXAudio2_CreateSubmixVoice(IXAudio2* This,IXAudio2SubmixVoice **ppSubmixVoice,UINT32 InputChannels,UINT32 InputSampleRate,UINT32 Flags,UINT32 ProcessingStage,const XAUDIO2_VOICE_SENDS *pSendList,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
1697 return This->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain);
1698}
1699static inline HRESULT IXAudio2_CreateMasteringVoice(IXAudio2* This,IXAudio2MasteringVoice **ppMasteringVoice,UINT32 InputChannels,UINT32 InputSampleRate,UINT32 Flags,LPCWSTR DeviceId,const XAUDIO2_EFFECT_CHAIN *pEffectChain,AUDIO_STREAM_CATEGORY category) {
1700 return This->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceId,pEffectChain,category);
1701}
1702static inline HRESULT IXAudio2_StartEngine(IXAudio2* This) {
1703 return This->lpVtbl->StartEngine(This);
1704}
1705static inline void IXAudio2_StopEngine(IXAudio2* This) {
1706 This->lpVtbl->StopEngine(This);
1707}
1708static inline HRESULT IXAudio2_CommitChanges(IXAudio2* This,UINT32 OperationSet) {
1709 return This->lpVtbl->CommitChanges(This,OperationSet);
1710}
1711static inline void IXAudio2_GetPerformanceData(IXAudio2* This,XAUDIO2_PERFORMANCE_DATA *pPerfData) {
1712 This->lpVtbl->GetPerformanceData(This,pPerfData);
1713}
1714static inline void IXAudio2_SetDebugConfiguration(IXAudio2* This,const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,void *pReserved) {
1715 This->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved);
1716}
1717#endif
1718#endif
1719
1720#endif
1721
1722
1723#endif /* __IXAudio2_INTERFACE_DEFINED__ */
1724
1725/*****************************************************************************
1726 * IXAudio2Extension interface
1727 */
1728#ifndef __IXAudio2Extension_INTERFACE_DEFINED__
1729#define __IXAudio2Extension_INTERFACE_DEFINED__
1730
1731DEFINE_GUID(IID_IXAudio2Extension, 0x84ac29bb, 0xd619, 0x44d2, 0xb1,0x97, 0xe4,0xac,0xf7,0xdf,0x3e,0xd6);
1732#if defined(__cplusplus) && !defined(CINTERFACE)
1733MIDL_INTERFACE("84ac29bb-d619-44d2-b197-e4acf7df3ed6")
1734IXAudio2Extension : public IUnknown
1735{
1736 virtual void STDMETHODCALLTYPE GetProcessingQuantum(
1737 UINT32 *quantum_numerator,
1738 UINT32 *quantum_denominator) = 0;
1739
1740 virtual void STDMETHODCALLTYPE GetProcessor(
1741 XAUDIO2_PROCESSOR *processor) = 0;
1742
1743};
1744#ifdef __CRT_UUID_DECL
1745__CRT_UUID_DECL(IXAudio2Extension, 0x84ac29bb, 0xd619, 0x44d2, 0xb1,0x97, 0xe4,0xac,0xf7,0xdf,0x3e,0xd6)
1746#endif
1747#else
1748typedef struct IXAudio2ExtensionVtbl {
1749 BEGIN_INTERFACE
1750
1751 /*** IUnknown methods ***/
1752 HRESULT (STDMETHODCALLTYPE *QueryInterface)(
1753 IXAudio2Extension *This,
1754 REFIID riid,
1755 void **ppvObject);
1756
1757 ULONG (STDMETHODCALLTYPE *AddRef)(
1758 IXAudio2Extension *This);
1759
1760 ULONG (STDMETHODCALLTYPE *Release)(
1761 IXAudio2Extension *This);
1762
1763 /*** IXAudio2Extension methods ***/
1764 void (STDMETHODCALLTYPE *GetProcessingQuantum)(
1765 IXAudio2Extension *This,
1766 UINT32 *quantum_numerator,
1767 UINT32 *quantum_denominator);
1768
1769 void (STDMETHODCALLTYPE *GetProcessor)(
1770 IXAudio2Extension *This,
1771 XAUDIO2_PROCESSOR *processor);
1772
1773 END_INTERFACE
1774} IXAudio2ExtensionVtbl;
1775
1776interface IXAudio2Extension {
1777 CONST_VTBL IXAudio2ExtensionVtbl* lpVtbl;
1778};
1779
1780#ifdef COBJMACROS
1781#ifndef WIDL_C_INLINE_WRAPPERS
1782/*** IUnknown methods ***/
1783#define IXAudio2Extension_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
1784#define IXAudio2Extension_AddRef(This) (This)->lpVtbl->AddRef(This)
1785#define IXAudio2Extension_Release(This) (This)->lpVtbl->Release(This)
1786/*** IXAudio2Extension methods ***/
1787#define IXAudio2Extension_GetProcessingQuantum(This,quantum_numerator,quantum_denominator) (This)->lpVtbl->GetProcessingQuantum(This,quantum_numerator,quantum_denominator)
1788#define IXAudio2Extension_GetProcessor(This,processor) (This)->lpVtbl->GetProcessor(This,processor)
1789#else
1790/*** IUnknown methods ***/
1791static inline HRESULT IXAudio2Extension_QueryInterface(IXAudio2Extension* This,REFIID riid,void **ppvObject) {
1792 return This->lpVtbl->QueryInterface(This,riid,ppvObject);
1793}
1794static inline ULONG IXAudio2Extension_AddRef(IXAudio2Extension* This) {
1795 return This->lpVtbl->AddRef(This);
1796}
1797static inline ULONG IXAudio2Extension_Release(IXAudio2Extension* This) {
1798 return This->lpVtbl->Release(This);
1799}
1800/*** IXAudio2Extension methods ***/
1801static inline void IXAudio2Extension_GetProcessingQuantum(IXAudio2Extension* This,UINT32 *quantum_numerator,UINT32 *quantum_denominator) {
1802 This->lpVtbl->GetProcessingQuantum(This,quantum_numerator,quantum_denominator);
1803}
1804static inline void IXAudio2Extension_GetProcessor(IXAudio2Extension* This,XAUDIO2_PROCESSOR *processor) {
1805 This->lpVtbl->GetProcessor(This,processor);
1806}
1807#endif
1808#endif
1809
1810#endif
1811
1812
1813#endif /* __IXAudio2Extension_INTERFACE_DEFINED__ */
1814
1815#define XAUDIO2_DEBUG_ENGINE (0x1)
1816
1817#define XAUDIO2_VOICE_NOPITCH (0x2)
1818
1819#define XAUDIO2_VOICE_NOSRC (0x4)
1820
1821#define XAUDIO2_VOICE_USEFILTER (0x8)
1822
1823#define XAUDIO2_VOICE_MUSIC (0x10)
1824
1825#define XAUDIO2_PLAY_TAILS (0x20)
1826
1827#define XAUDIO2_END_OF_STREAM (0x40)
1828
1829#define XAUDIO2_SEND_USEFILTER (0x80)
1830
1831#define XAUDIO2_VOICE_NOSAMPLESPLAYED (0x100)
1832
1833#define XAUDIO2_DEFAULT_FILTER_TYPE (LowPassFilter)
1834
1835#define XAUDIO2_DEFAULT_FILTER_FREQUENCY (XAUDIO2_MAX_FILTER_FREQUENCY)
1836
1837#define XAUDIO2_DEFAULT_FILTER_ONEOVERQ (1.00000000000000)
1838
1839#define XAUDIO2_QUANTUM_NUMERATOR (1)
1840
1841#define XAUDIO2_QUANTUM_DENOMINATOR (100)
1842
1843#define XAUDIO2_QUANTUM_MS ((1000.00000000000 * XAUDIO2_QUANTUM_NUMERATOR) / XAUDIO2_QUANTUM_DENOMINATOR)
1844
1845#define XAUDIO2_E_INVALID_CALL ((HRESULT)0x88960001)
1846#define XAUDIO2_E_XMA_DECODER_ERROR ((HRESULT)0x88960002)
1847#define XAUDIO2_E_XAPO_CREATION_FAILED ((HRESULT)0x88960003)
1848#define XAUDIO2_E_DEVICE_INVALIDATED ((HRESULT)0x88960004)
1849#ifdef XAUDIO2_HELPER_FUNCTIONS
1850#define _USE_MATH_DEFINES
1851#include <math.h>
1852inline static float XAudio2DecibelsToAmplitudeRatio(float decibels) { return powf(10.0f, decibels/20.0f); }
1853inline static float XAudio2AmplitudeRatioToDecibels(float volume) { if (volume == 0) { return -3.402823466e+38f; } return 20.0f * log10f(volume); }
1854inline static float XAudio2SemitonesToFrequencyRatio(float semitones) { return powf(2.0f, semitones/12.0f); }
1855inline static float XAudio2FrequencyRatioToSemitones(float freqratio) { return 39.86313713864835f * log10f(freqratio); }
1856inline static float XAudio2CutoffFrequencyToRadians(float cutofffreq, UINT32 samplerate) { if ((UINT32)(cutofffreq * 6.0f) >= samplerate) { return XAUDIO2_MAX_FILTER_FREQUENCY; } return 2.0f * sinf((float)M_PI * cutofffreq / samplerate); }
1857inline static float XAudio2RadiansToCutoffFrequency(float radians, float samplerate) { return samplerate * asinf(radians/2.0f) / (float)M_PI; }
1858#endif
1859#pragma pack(pop)
1860HRESULT WINAPI XAudio2Create(IXAudio2** pxaudio2, UINT32 flags, XAUDIO2_PROCESSOR processor);
1861/* Begin additional prototypes for all interfaces */
1862
1863
1864/* End additional prototypes */
1865
1866#ifdef __cplusplus
1867}
1868#endif
1869
1870#endif /* __xaudio2_h__ */