22 #ifndef _SDL_XAUDIO2_H 23 #define _SDL_XAUDIO2_H 43 typedef enum _AUDIO_STREAM_CATEGORY {
151 #define Processor1 0x00000001 152 #define XAUDIO2_DEFAULT_PROCESSOR Processor1 154 #define XAUDIO2_E_DEVICE_INVALIDATED 0x88960004 155 #define XAUDIO2_COMMIT_NOW 0 156 #define XAUDIO2_VOICE_NOSAMPLESPLAYED 0x0100 157 #define XAUDIO2_DEFAULT_CHANNELS 0 166 #define INTERFACE IXAudio2 174 STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
175 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
176 STDMETHOD_(ULONG, Release)(THIS) PURE;
182 const WAVEFORMATEX *pSourceFormat,
184 float MaxFrequencyRatio,
189 UINT32 InputChannels,
190 UINT32 InputSampleRate,
192 UINT32 ProcessingStage,
196 UINT32 InputChannels,
197 UINT32 InputSampleRate,
202 STDMETHOD_(HRESULT, StartEngine)(THIS) PURE;
203 STDMETHOD_(VOID, StopEngine)(THIS) PURE;
204 STDMETHOD_(HRESULT, CommitChanges)(THIS, UINT32 OperationSet) PURE;
207 VOID *pReserved) PURE;
210 #define IXAudio2_Release(A) ((A)->lpVtbl->Release(A)) 211 #define IXAudio2_CreateSourceVoice(A,B,C,D,E,F,G,H) ((A)->lpVtbl->CreateSourceVoice(A,B,C,D,E,F,G,H)) 212 #define IXAudio2_CreateMasteringVoice(A,B,C,D,E,F,G,H) ((A)->lpVtbl->CreateMasteringVoice(A,B,C,D,E,F,G,H)) 213 #define IXAudio2_StartEngine(A) ((A)->lpVtbl->StartEngine(A)) 214 #define IXAudio2_StopEngine(A) ((A)->lpVtbl->StopEngine(A)) 218 #define INTERFACE IXAudio2SourceVoice 234 STDMETHOD_(HRESULT, EnableEffect)(THIS, UINT32 EffectIndex, UINT32 OperationSet) PURE;
235 STDMETHOD_(HRESULT, DisableEffect)(THIS, UINT32 EffectIndex, UINT32 OperationSet) PURE;
236 STDMETHOD_(VOID, GetEffectState)(THIS, UINT32 EffectIndex, BOOL *pEnabled) PURE;
237 STDMETHOD_(HRESULT, SetEffectParameters)(THIS, UINT32 EffectIndex,
238 const void *pParameters,
239 UINT32 ParametersByteSize,
240 UINT32 OperationSet) PURE;
241 STDMETHOD_(VOID, GetEffectParameters)(THIS, UINT32 EffectIndex,
243 UINT32 ParametersByteSize) PURE;
245 UINT32 OperationSet) PURE;
247 STDMETHOD_(HRESULT, SetOutputFilterParameters)(THIS,
IXAudio2Voice *pDestinationVoice,
249 UINT32 OperationSet) PURE;
250 STDMETHOD_(VOID, GetOutputFilterParameters)(THIS,
IXAudio2Voice *pDestinationVoice,
252 STDMETHOD_(HRESULT, SetVolume)(THIS,
float Volume,
253 UINT32 OperationSet) PURE;
254 STDMETHOD_(VOID, GetVolume)(THIS,
float *pVolume) PURE;
255 STDMETHOD_(HRESULT, SetChannelVolumes)(THIS, UINT32 Channels,
257 UINT32 OperationSet) PURE;
258 STDMETHOD_(VOID, GetChannelVolumes)(THIS, UINT32 Channels,
259 float *pVolumes) PURE;
260 STDMETHOD_(HRESULT, SetOutputMatrix)(THIS,
IXAudio2Voice *pDestinationVoice,
262 UINT32 DestinationChannels,
263 const float *pLevelMatrix,
264 UINT32 OperationSet) PURE;
266 UINT32 SourceChannels,
267 UINT32 DestinationChannels,
268 float *pLevelMatrix) PURE;
269 STDMETHOD_(VOID, DestroyVoice)(THIS) PURE;
272 STDMETHOD_(HRESULT, Start)(THIS, UINT32
Flags,
273 UINT32 OperationSet) PURE;
274 STDMETHOD_(HRESULT, Stop)(THIS, UINT32
Flags,
275 UINT32 OperationSet) PURE;
278 STDMETHOD_(HRESULT, FlushSourceBuffers)(THIS) PURE;
279 STDMETHOD_(HRESULT, Discontinuity)(THIS) PURE;
280 STDMETHOD_(HRESULT, ExitLoop)(THIS, UINT32 OperationSet) PURE;
283 STDMETHOD_(HRESULT, SetFrequencyRatio)(THIS,
float Ratio,
284 UINT32 OperationSet) PURE;
285 STDMETHOD_(VOID, GetFrequencyRatio)(THIS,
float *pRatio) PURE;
286 STDMETHOD_(HRESULT, SetSourceSampleRate)(THIS, UINT32 NewSourceSampleRate) PURE;
289 #define IXAudio2SourceVoice_DestroyVoice(A) ((A)->lpVtbl->DestroyVoice(A)) 290 #define IXAudio2SourceVoice_Start(A,B,C) ((A)->lpVtbl->Start(A,B,C)) 291 #define IXAudio2SourceVoice_Stop(A,B,C) ((A)->lpVtbl->Stop(A,B,C)) 292 #define IXAudio2SourceVoice_SubmitSourceBuffer(A,B,C) ((A)->lpVtbl->SubmitSourceBuffer(A,B,C)) 293 #define IXAudio2SourceVoice_FlushSourceBuffers(A) ((A)->lpVtbl->FlushSourceBuffers(A)) 294 #define IXAudio2SourceVoice_Discontinuity(A) ((A)->lpVtbl->Discontinuity(A)) 295 #define IXAudio2SourceVoice_GetState(A,B,C) ((A)->lpVtbl->GetState(A,B,C)) 299 #define INTERFACE IXAudio2MasteringVoice 315 STDMETHOD_(HRESULT, EnableEffect)(THIS, UINT32 EffectIndex, UINT32 OperationSet) PURE;
316 STDMETHOD_(HRESULT, DisableEffect)(THIS, UINT32 EffectIndex, UINT32 OperationSet) PURE;
317 STDMETHOD_(VOID, GetEffectState)(THIS, UINT32 EffectIndex, BOOL *pEnabled) PURE;
318 STDMETHOD_(HRESULT, SetEffectParameters)(THIS, UINT32 EffectIndex,
319 const void *pParameters,
320 UINT32 ParametersByteSize,
321 UINT32 OperationSet) PURE;
322 STDMETHOD_(VOID, GetEffectParameters)(THIS, UINT32 EffectIndex,
324 UINT32 ParametersByteSize) PURE;
326 UINT32 OperationSet) PURE;
328 STDMETHOD_(HRESULT, SetOutputFilterParameters)(THIS,
IXAudio2Voice *pDestinationVoice,
330 UINT32 OperationSet) PURE;
331 STDMETHOD_(VOID, GetOutputFilterParameters)(THIS,
IXAudio2Voice *pDestinationVoice,
333 STDMETHOD_(HRESULT, SetVolume)(THIS,
float Volume,
334 UINT32 OperationSet) PURE;
335 STDMETHOD_(VOID, GetVolume)(THIS,
float *pVolume) PURE;
336 STDMETHOD_(HRESULT, SetChannelVolumes)(THIS, UINT32 Channels,
338 UINT32 OperationSet) PURE;
339 STDMETHOD_(VOID, GetChannelVolumes)(THIS, UINT32 Channels,
340 float *pVolumes) PURE;
341 STDMETHOD_(HRESULT, SetOutputMatrix)(THIS,
IXAudio2Voice *pDestinationVoice,
343 UINT32 DestinationChannels,
344 const float *pLevelMatrix,
345 UINT32 OperationSet) PURE;
347 UINT32 SourceChannels,
348 UINT32 DestinationChannels,
349 float *pLevelMatrix) PURE;
350 STDMETHOD_(VOID, DestroyVoice)(THIS) PURE;
353 STDMETHOD_(VOID, GetChannelMask)(THIS, DWORD *pChannelMask) PURE;
356 #define IXAudio2MasteringVoice_DestroyVoice(A) ((A)->lpVtbl->DestroyVoice(A)) 360 #define INTERFACE IXAudio2VoiceCallback 373 STDMETHOD_(VOID, OnVoiceProcessingPassStart)(THIS, UINT32 BytesRequired) PURE;
374 STDMETHOD_(VOID, OnVoiceProcessingPassEnd)(THIS) PURE;
375 STDMETHOD_(VOID, OnStreamEnd)(THIS) PURE;
376 STDMETHOD_(VOID, OnBufferStart)(THIS,
void *pBufferContext) PURE;
377 STDMETHOD_(VOID, OnBufferEnd)(THIS,
void *pBufferContext) PURE;
378 STDMETHOD_(VOID, OnLoopEnd)(THIS,
void *pBufferContext) PURE;
379 STDMETHOD_(VOID, OnVoiceError)(THIS,
void *pBufferContext, HRESULT Error) PURE;
UINT32 MemoryUsageInBytes
IXAudio2Voice * pOutputVoice
UINT32 ActiveXmaSourceVoices
UINT32 MinimumCyclesPerQuantum
UINT32 MaximumCyclesPerQuantum
interface IXAudio2MasteringVoice IXAudio2MasteringVoice
UINT32 CurrentLatencyInSamples
interface IXAudio2Voice IXAudio2Voice
XAUDIO2_VOICE_STATE * pVoiceState
interface IXAudio2EngineCallback IXAudio2EngineCallback
UINT32 ActiveSourceVoiceCount
interface IXAudio2 IXAudio2
UINT64 TotalCyclesSinceLastQuery
XAUDIO2_SEND_DESCRIPTOR * pSends
UINT32 ActiveSubmixVoiceCount
UINT32 const float * pVolumes
IXAudio2MasteringVoice UINT32 UINT32 UINT32 LPCWSTR szDeviceId
IXAudio2Voice UINT32 SourceChannels
UINT32 TotalSourceVoiceCount
UINT32 const float * pVolumes
interface IXAudio2SourceVoice IXAudio2SourceVoice
IXAudio2Voice UINT32 SourceChannels
interface IXAudio2VoiceCallback IXAudio2VoiceCallback
const UINT32 * pDecodedPacketCumulativeBytes
interface IXAudio2SubmixVoice IXAudio2SubmixVoice
UINT64 AudioCyclesSinceLastQuery
void * pCurrentBufferContext
HRESULT __stdcall XAudio2Create(_Out_ IXAudio2 **ppXAudio2, _In_ UINT32 Flags, _In_ XAUDIO2_PROCESSOR XAudio2Processor)
UINT32 GlitchesSinceEngineStarted
UINT32 ActiveResamplerCount
XAUDIO2_EFFECT_DESCRIPTOR * pEffectDescriptors
UINT32 ActiveMatrixMixCount