20 #ifndef XAUDIO2_STRIPPED_H 21 #define XAUDIO2_STRIPPED_H 29 #if defined(__cplusplus) && !defined(CINTERFACE) 30 #define X2DEFAULT(x) = (x) 39 #define OPAQUE interface 41 #define DEFINE_CLSID(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 42 DEFINE_GUID(CLSID_##className, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8) 43 #define DEFINE_IID(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 44 DEFINE_GUID(IID_##interfaceName, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8) 46 DEFINE_CLSID(XAudio2, 3eda9b49, 2085, 498
b, 9
b, b2, 39, a6, 77, 84, 93,
de);
47 DEFINE_CLSID(XAudio2_Debug, 47199894, 7cc2, 444d, 98, 73, ce, d2, 56, 2
c, c6, 0e);
48 DEFINE_IID(IXAudio2, 8bcf1f58, 9fe7, 4583, 8
a, c6, e2,
ad, c4, 65, c8, bb);
54 #define WIN32_LEAN_AND_MEAN 65 #define DEFINE_GUID_X(n, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 66 static const GUID n = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } 67 #define DEFINE_CLSID_X(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 68 DEFINE_GUID_X(CLSID_##className, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8) 69 #define DEFINE_IID_X(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 70 DEFINE_GUID_X(IID_##interfaceName, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8) 74 #define INTERFACE void 78 DEFINE_CLSID_X(XAudio2, 5a508685, a254, 4fba, 9
b, 82, 9
a, 24, b0, 03, 06, af);
79 DEFINE_IID_X(IXAudio2, 8bcf1f58, 9fe7, 4583, 8
a, c6, e2,
ad, c4, 65, c8, bb);
84 #define XAUDIO2_DEFAULT_FREQ_RATIO 2.0f 86 #define XAUDIO2_DEFAULT_FREQ_RATIO 4.0f 89 #define XAUDIO2_COMMIT_NOW 0 90 #define XAUDIO2_DEFAULT_CHANNELS 0 91 #define XAUDIO2_DEFAULT_SAMPLERATE 0 93 #define XAUDIO2_DEBUG_ENGINE 0x0001 94 #define XAUDIO2_VOICE_NOSRC 0x0004 108 typedef enum XAUDIO2_XBOX_HWTHREAD_SPECIFIER
122 #if defined(__STDC_C89__) 187 #define INTERFACE IXAudio2VoiceCallback 191 STDMETHOD_(
void, OnVoiceProcessingPassStart) (THIS_
UINT32 BytesRequired) PURE;
192 STDMETHOD_(
void, OnVoiceProcessingPassEnd) (THIS) PURE;
193 STDMETHOD_(
void, OnStreamEnd) (THIS) PURE;
194 STDMETHOD_(
void, OnBufferStart) (THIS_
void *pBufferContext) PURE;
195 STDMETHOD_(
void, OnBufferEnd) (THIS_
void *pBufferContext) PURE;
196 STDMETHOD_(
void, OnLoopEnd) (THIS_
void *pBufferContext) PURE;
197 STDMETHOD_(
void, OnVoiceError) (THIS_
void *pBufferContext,
HRESULT Error) PURE;
201 #define INTERFACE IXAudio2Voice 205 #define Declare_IXAudio2Voice_Methods() \ 206 STDMETHOD_(void, GetVoiceDetails) (THIS_ XAUDIO2_VOICE_DETAILS* pVoiceDetails) PURE; \ 207 STDMETHOD(SetOutputVoices) (THIS_ const XAUDIO2_VOICE_SENDS* pSendList) PURE; \ 208 STDMETHOD(SetEffectChain) (THIS_ const XAUDIO2_EFFECT_CHAIN* pEffectChain) PURE; \ 209 STDMETHOD(EnableEffect) (THIS_ UINT32 EffectIndex, \ 210 UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \ 211 STDMETHOD(DisableEffect) (THIS_ UINT32 EffectIndex, \ 212 UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \ 213 STDMETHOD_(void, GetEffectState) (THIS_ UINT32 EffectIndex, BOOL* pEnabled) PURE; \ 214 STDMETHOD(SetEffectParameters) (THIS_ UINT32 EffectIndex, \ 215 const void *pParameters, \ 216 UINT32 ParametersByteSize, \ 217 UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \ 218 STDMETHOD(GetEffectParameters) (THIS_ UINT32 EffectIndex, void *pParameters, \ 219 UINT32 ParametersByteSize) PURE; \ 220 STDMETHOD(SetFilterParameters) (THIS_ const XAUDIO2_FILTER_PARAMETERS* pParameters, \ 221 UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \ 222 STDMETHOD_(void, GetFilterParameters) (THIS_ XAUDIO2_FILTER_PARAMETERS* pParameters) PURE; \ 223 STDMETHOD_(void, SetOutputFilterParameters) (THIS_ IXAudio2Voice *voice, const XAUDIO2_FILTER_PARAMETERS* param, \ 224 UINT32 op X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \ 225 STDMETHOD_(void, GetOutputFilterParameters) (THIS_ IXAudio2Voice *voice, XAUDIO2_FILTER_PARAMETERS* param) PURE; \ 226 STDMETHOD(SetVolume) (THIS_ float Volume, \ 227 UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \ 228 STDMETHOD_(void, GetVolume) (THIS_ float* pVolume) PURE; \ 229 STDMETHOD(SetChannelVolumes) (THIS_ UINT32 Channels, const float* pVolumes, \ 230 UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \ 231 STDMETHOD_(void, GetChannelVolumes) (THIS_ UINT32 Channels, float* pVolumes) PURE; \ 232 STDMETHOD(SetOutputMatrix) (THIS_ IXAudio2Voice* pDestinationVoice, \ 233 UINT32 SourceChannels, UINT32 DestinationChannels, \ 234 const float* pLevelMatrix, \ 235 UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \ 236 STDMETHOD_(void, GetOutputMatrix) (THIS_ IXAudio2Voice* pDestinationVoice, \ 237 UINT32 SourceChannels, UINT32 DestinationChannels, \ 238 float* pLevelMatrix) PURE; \ 239 STDMETHOD_(void, DestroyVoice) (THIS) PURE 245 #define INTERFACE IXAudio2MasteringVoice 253 #define INTERFACE IXAudio2SourceVoice 261 STDMETHOD(FlushSourceBuffers) (THIS) PURE;
262 STDMETHOD(Discontinuity) (THIS) PURE;
265 STDMETHOD(SetFrequencyRatio) (THIS_
float Ratio,
267 STDMETHOD_(
void, GetFrequencyRatio) (THIS_
float* pRatio) PURE;
271 #define INTERFACE IXAudio2 275 STDMETHOD(QueryInterface) (THIS_ REFIID riid,
void** ppvInterface) PURE;
276 STDMETHOD_(ULONG, AddRef) (THIS) PURE;
277 STDMETHOD_(ULONG,
Release) (THIS) PURE;
278 STDMETHOD(GetDeviceCount) (THIS_
UINT32* pCount) PURE;
284 STDMETHOD(CreateSourceVoice) (THIS_ IXAudio2SourceVoice** ppSourceVoice,
296 STDMETHOD(CreateMasteringVoice) (THIS_ IXAudio2MasteringVoice** ppMasteringVoice,
301 STDMETHOD(StartEngine) (THIS) PURE;
302 STDMETHOD_(
void, StopEngine) (THIS) PURE;
303 STDMETHOD(CommitChanges) (THIS_
UINT32 OperationSet) PURE;
309 #if defined(__cplusplus) && !defined(CINTERFACE) 311 #define IXAudio2_Initialize(handle,a,b) handle->Initialize(a, b) 312 #define IXAudio2SourceVoice_SubmitSourceBuffer(handle, a, b) handle->SubmitSourceBuffer(a, b) 313 #define IXAudio2SourceVoice_Stop(handle, a, b) handle->Stop(a, b) 314 #define IXAudio2SourceVoice_DestroyVoice(handle) handle->DestroyVoice() 315 #define IXAudio2MasteringVoice_DestroyVoice(handle) handle->DestroyVoice() 316 #define IXAudio2_Release(handle) handle->Release() 317 #define IXAudio2_CreateSourceVoice(handle, a, b, c, d, e, f, g) handle->CreateSourceVoice(a, b, c, d, e, f, g) 318 #define IXAudio2_CreateMasteringVoice(handle, a, b, c, d, e, f) handle->CreateMasteringVoice(a, b, c, d, e, f) 319 #define IXAudio2SourceVoice_Start(handle, a, b) handle->Start(a, b) 322 #define IXAudio2_Initialize(handle,a,b) (handle)->lpVtbl->Initialize(handle, a, b) 323 #define IXAudio2_Release(handle) (handle)->lpVtbl->Release(handle) 324 #define IXAudio2_CreateSourceVoice(handle,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) (handle)->lpVtbl->CreateSourceVoice(handle, ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) 325 #define IXAudio2_CreateMasteringVoice(handle,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) (handle)->lpVtbl->CreateMasteringVoice(handle, ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) 326 #define IXAudio2_GetDeviceCount(handle, puCount) (handle)->lpVtbl->GetDeviceCount(handle, puCount) 327 #define IXAudio2_GetDeviceDetails(handle, Index,pDeviceDetails) (handle)->lpVtbl->GetDeviceDetails(handle, Index, pDeviceDetails) 328 #define IXAudio2SourceVoice_Start(handle, Flags, OperationSet) (handle)->lpVtbl->Start(handle, Flags, OperationSet) 329 #define IXAudio2SourceVoice_Stop(handle, Flags, OperationSet) (handle)->lpVtbl->Stop(handle, Flags, OperationSet) 330 #define IXAudio2SourceVoice_SubmitSourceBuffer(handle, pBuffer, pBufferWMA) (handle)->lpVtbl->SubmitSourceBuffer(handle, pBuffer, pBufferWMA) 331 #define IXAudio2SourceVoice_DestroyVoice(handle) (handle)->lpVtbl->DestroyVoice(handle) 332 #define IXAudio2MasteringVoice_DestroyVoice(handle) (handle)->lpVtbl->DestroyVoice(handle) 341 IXAudio2 *pXAudio2 =
NULL;
343 HRESULT hr = CoCreateInstance(CLSID_XAudio2,
NULL, CLSCTX_INPROC_SERVER, IID_IXAudio2, (
void**)&pXAudio2);
345 HRESULT hr = CoCreateInstance(&CLSID_XAudio2,
NULL, CLSCTX_INPROC_SERVER, &IID_IXAudio2, (
void**)&pXAudio2);
352 *ppXAudio2 = pXAudio2;
UINT32 PlayBegin
Definition: xaudio27.h:178
XAUDIO2_FILTER_TYPE
Definition: xaudio27.h:131
#define Declare_IXAudio2Voice_Methods()
byte Error
Definition: jsonsax_full.c:107
enum XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER XAUDIO2_PROCESSOR
#define DEFINE_IID_X(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: xaudio27.h:69
#define INLINE
Definition: retro_inline.h:35
UINT32 AudioBytes
Definition: xaudio27.h:176
struct XAUDIO2_BUFFER XAUDIO2_BUFFER
Definition: xaudio27.h:127
XAUDIO2_DEVICE_ROLE Role
Definition: xaudio27.h:141
Definition: xaudio27.h:137
OPAQUE XAUDIO2_VOICE_STATE XAUDIO2_VOICE_STATE
Definition: xaudio27.h:165
OPAQUE XAUDIO2_EFFECT_DESCRIPTOR XAUDIO2_EFFECT_DESCRIPTOR
Definition: xaudio27.h:161
OPAQUE XAUDIO2_FILTER_PARAMETERS XAUDIO2_FILTER_PARAMETERS
Definition: xaudio27.h:163
void * pContext
Definition: xaudio27.h:183
Definition: xaudio27.h:99
OPAQUE XAUDIO2_VOICE_DETAILS XAUDIO2_VOICE_DETAILS
Definition: xaudio27.h:159
struct XAUDIO2_DEVICE_DETAILS XAUDIO2_DEVICE_DETAILS
#define DEFINE_IID(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: comdecl.h:54
typedef HRESULT(WINAPI *PFN_D3D12_SERIALIZE_ROOT_SIGNATURE)(_In_ const D3D12_ROOT_SIGNATURE_DESC *pRootSignature
const GLubyte * c
Definition: glext.h:9812
GLboolean GLboolean GLboolean b
Definition: glext.h:6844
OPAQUE IXAudio2EngineCallback IXAudio2EngineCallback
Definition: xaudio27.h:168
#define IXAudio2_Initialize(handle, a, b)
Definition: xaudio27.h:322
DECLARE_INTERFACE(IXAudio2VoiceCallback)
Definition: xaudio27.h:189
#define NULL
Pointer to 0.
Definition: gctypes.h:65
OPAQUE XAUDIO2_BUFFER_WMA XAUDIO2_BUFFER_WMA
Definition: xaudio27.h:164
static INLINE HRESULT XAudio2Create(IXAudio2 **ppXAudio2, UINT32 flags, XAUDIO2_PROCESSOR proc)
Definition: xaudio27.h:339
#define X2DEFAULT(x)
Definition: xaudio27.h:32
Definition: audiodefs.h:74
Definition: xaudio27.h:100
OPAQUE IXAudio2SubmixVoice IXAudio2SubmixVoice
Definition: xaudio27.h:169
#define DEFINE_CLSID(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: comdecl.h:51
Definition: xaudio27.h:133
OPAQUE XAUDIO2_DEBUG_CONFIGURATION XAUDIO2_DEBUG_CONFIGURATION
Definition: xaudio27.h:167
OPAQUE XAUDIO2_PERFORMANCE_DATA XAUDIO2_PERFORMANCE_DATA
Definition: xaudio27.h:166
UINT32 LoopCount
Definition: xaudio27.h:182
UINT32 LoopLength
Definition: xaudio27.h:181
Definition: xaudio27.h:103
XAUDIO2_DEVICE_ROLE
Definition: xaudio27.h:96
UINT32 LoopBegin
Definition: xaudio27.h:180
WCHAR DeviceID[256]
Definition: xaudio27.h:139
static INLINE ULONG Release(void *object)
Definition: dxgi_common.h:253
Definition: xaudio27.h:102
UINT32 Flags
Definition: xaudio27.h:175
uint32_t UINT32
Definition: coretypes.h:10
Definition: xaudio27.h:101
const BYTE * pAudioData
Definition: xaudio27.h:177
OPAQUE XAUDIO2_VOICE_SENDS XAUDIO2_VOICE_SENDS
Definition: xaudio27.h:160
#define XAUDIO2_DEFAULT_CHANNELS
Definition: xaudio27.h:90
DECLARE_INTERFACE_(IXAudio2MasteringVoice, IXAudio2Voice)
Definition: xaudio27.h:247
Definition: audiodefs.h:40
OPAQUE XAUDIO2_EFFECT_CHAIN XAUDIO2_EFFECT_CHAIN
Definition: xaudio27.h:162
WCHAR DisplayName[256]
Definition: xaudio27.h:140
#define XAUDIO2_COMMIT_NOW
Definition: xaudio27.h:89
#define DEFINE_CLSID_X(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: xaudio27.h:67
#define IXAudio2_Release(handle)
Definition: xaudio27.h:323
UINT32 PlayLength
Definition: xaudio27.h:179
Definition: xaudio27.h:173
#define XAUDIO2_DEFAULT_SAMPLERATE
Definition: xaudio27.h:91
XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER
Definition: xaudio27.h:120
GLbitfield flags
Definition: glext.h:7828
Definition: civetweb.c:1321
Definition: xaudio27.h:125
Definition: xaudio27.h:98
static const unsigned char ad[]
Definition: ccm.c:369
Definition: xaudio27.h:104
#define OPAQUE
Definition: xaudio27.h:62
Definition: xaudio27.h:132
#define XAUDIO2_DEFAULT_FREQ_RATIO
Definition: xaudio27.h:86
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6844
Definition: xaudio27.h:134
WAVEFORMATEXTENSIBLE OutputFormat
Definition: xaudio27.h:142