87 DEFINE_IID(IXAPO, A90BC001, E897, E897, 55, E4, 9E, 47, 00, 00, 00, 00);
88 DEFINE_IID(IXAPOParameters, A90BC001, E897, E897, 55, E4, 9E, 47, 00, 00, 00, 01);
91 #if !defined(GUID_DEFS_ONLY) // ignore rest if only GUID definitions requested 92 #if defined(_XBOX) // general windows and COM declarations 99 #include "audiodefs.h" 102 #define FACILITY_XAPO 0x897 103 #define XAPO_E_FORMAT_UNSUPPORTED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_XAPO, 0x01) // requested audio format unsupported 106 #define XAPO_MIN_CHANNELS 1 107 #define XAPO_MAX_CHANNELS 64 110 #define XAPO_MIN_FRAMERATE 1000 111 #define XAPO_MAX_FRAMERATE 200000 114 #define XAPO_REGISTRATION_STRING_LENGTH 256 120 #define XAPO_FLAG_CHANNELS_MUST_MATCH 0x00000001 124 #define XAPO_FLAG_FRAMERATE_MUST_MATCH 0x00000002 130 #define XAPO_FLAG_BITSPERSAMPLE_MUST_MATCH 0x00000004 139 #define XAPO_FLAG_BUFFERCOUNT_MUST_MATCH 0x00000008 154 #define XAPO_FLAG_INPLACE_REQUIRED 0x00000020 168 #define XAPO_FLAG_INPLACE_SUPPORTED 0x00000010 172 #pragma pack(push, 1) // set packing alignment to ensure consistency across arbitrary build environments 178 WCHAR FriendlyName[XAPO_REGISTRATION_STRING_LENGTH];
179 WCHAR CopyrightInfo[XAPO_REGISTRATION_STRING_LENGTH];
183 UINT32 MinInputBufferCount;
184 UINT32 MaxInputBufferCount;
185 UINT32 MinOutputBufferCount;
186 UINT32 MaxOutputBufferCount;
198 UINT32 MaxFrameCount;
218 typedef enum XAPO_BUFFER_FLAGS {
239 XAPO_BUFFER_FLAGS BufferFlags;
240 UINT32 ValidFrameCount;
252 #define XAPO_ALLOC_ATTRIBUTES MAKE_XALLOC_ATTRIBUTES ( \ 257 eXALLOCAllocatorId_XAUDIO2, \ 258 XALLOC_ALIGNMENT_DEFAULT, \ 259 XALLOC_MEMPROTECT_READWRITE, \ 261 XALLOC_MEMTYPE_HEAP \ 263 #define XAPOAlloc(size) XMemAlloc(size, XAPO_ALLOC_ATTRIBUTES) 264 #define XAPOFree(p) XMemFree(p, XAPO_ALLOC_ATTRIBUTES) 266 #define XAPOAlloc(size) CoTaskMemAlloc(size) 267 #define XAPOFree(p) CoTaskMemFree(p) 276 #define INTERFACE IXAPO 277 DECLARE_INTERFACE_(IXAPO, IUnknown) {
317 STDMETHOD(IsInputFormatSupported) (THIS_
const WAVEFORMATEX* pOutputFormat,
const WAVEFORMATEX* pRequestedInputFormat, __deref_opt_out
WAVEFORMATEX** ppSupportedInputFormat) PURE;
346 STDMETHOD(IsOutputFormatSupported) (THIS_
const WAVEFORMATEX* pInputFormat,
const WAVEFORMATEX* pRequestedOutputFormat, __deref_opt_out
WAVEFORMATEX** ppSupportedOutputFormat) PURE;
369 STDMETHOD(Initialize) (THIS_ __in_bcount_opt(DataByteSize)
const void* pData, UINT32 DataByteSize) PURE;
393 STDMETHOD_(
void, Reset) (THIS) PURE;
443 STDMETHOD_(
void, UnlockForProcess) (THIS) PURE;
486 STDMETHOD_(
void, Process) (THIS_ UINT32 InputProcessParameterCount, __in_ecount_opt(InputProcessParameterCount)
const XAPO_PROCESS_BUFFER_PARAMETERS* pInputProcessParameters, UINT32 OutputProcessParameterCount, __inout_ecount_opt(OutputProcessParameterCount)
XAPO_PROCESS_BUFFER_PARAMETERS* pOutputProcessParameters, BOOL IsEnabled) PURE;
508 STDMETHOD_(UINT32, CalcInputFrames) (THIS_ UINT32 OutputFrameCount) PURE;
530 STDMETHOD_(UINT32, CalcOutputFrames) (THIS_ UINT32 InputFrameCount) PURE;
539 #define INTERFACE IXAPOParameters 540 DECLARE_INTERFACE_(IXAPOParameters, IUnknown) {
559 STDMETHOD_(
void, SetParameters) (THIS_ __in_bcount(ParameterByteSize)
const void* pParameters, UINT32 ParameterByteSize) PURE;
577 STDMETHOD_(
void, GetParameters) (THIS_ __out_bcount(ParameterByteSize)
void* pParameters, UINT32 ParameterByteSize) PURE;
583 #if !defined(__cplusplus) 585 #define IXAPO_QueryInterface(This, riid, ppInterface) \ 586 ( (This)->lpVtbl->QueryInterface(This, riid, ppInterface) ) 588 #define IXAPO_AddRef(This) \ 589 ( (This)->lpVtbl->AddRef(This) ) 591 #define IXAPO_Release(This) \ 592 ( (This)->lpVtbl->Release(This) ) 594 #define IXAPO_GetRegistrationProperties(This, ppRegistrationProperties) \ 595 ( (This)->lpVtbl->GetRegistrationProperties(This, ppRegistrationProperties) ) 597 #define IXAPO_IsInputFormatSupported(This, pOutputFormat, pRequestedInputFormat, ppSupportedInputFormat) \ 598 ( (This)->lpVtbl->IsInputFormatSupported(This, pOutputFormat, pRequestedInputFormat, ppSupportedInputFormat) ) 600 #define IXAPO_IsOutputFormatSupported(This, pInputFormat, pRequestedOutputFormat, ppSupportedOutputFormat) \ 601 ( (This)->lpVtbl->IsOutputFormatSupported(This, pInputFormat, pRequestedOutputFormat, ppSupportedOutputFormat) ) 603 #define IXAPO_Initialize(This, pData, DataByteSize) \ 604 ( (This)->lpVtbl->Initialize(This, pData, DataByteSize) ) 606 #define IXAPO_Reset(This) \ 607 ( (This)->lpVtbl->Reset(This) ) 609 #define IXAPO_LockForProcess(This, InputLockedParameterCount, pInputLockedParameters, OutputLockedParameterCount, pOutputLockedParameters) \ 610 ( (This)->lpVtbl->LockForProcess(This, InputLockedParameterCount, pInputLockedParameters, OutputLockedParameterCount, pOutputLockedParameters) ) 612 #define IXAPO_UnlockForProcess(This) \ 613 ( (This)->lpVtbl->UnlockForProcess(This) ) 615 #define IXAPO_Process(This, InputProcessParameterCount, pInputProcessParameters, OutputProcessParameterCount, pOutputProcessParameters, IsEnabled) \ 616 ( (This)->lpVtbl->Process(This, InputProcessParameterCount, pInputProcessParameters, OutputProcessParameterCount, pOutputProcessParameters, IsEnabled) ) 618 #define IXAPO_CalcInputFrames(This, OutputFrameCount) \ 619 ( (This)->lpVtbl->CalcInputFrames(This, OutputFrameCount) ) 621 #define IXAPO_CalcOutputFrames(This, InputFrameCount) \ 622 ( (This)->lpVtbl->CalcOutputFrames(This, InputFrameCount) ) 626 #define IXAPOParameters_QueryInterface(This, riid, ppInterface) \ 627 ( (This)->lpVtbl->QueryInterface(This, riid, ppInterface) ) 629 #define IXAPOParameters_AddRef(This) \ 630 ( (This)->lpVtbl->AddRef(This) ) 632 #define IXAPOParameters_Release(This) \ 633 ( (This)->lpVtbl->Release(This) ) 635 #define IXAPOParameters_SetParameters(This, pParameters, ParameterByteSize) \ 636 ( (This)->lpVtbl->SetParameters(This, pParameters, ParameterByteSize) ) 638 #define IXAPOParameters_GetParameters(This, pParameters, ParameterByteSize) \ 639 ( (This)->lpVtbl->GetParameters(This, pParameters, ParameterByteSize) ) 640 #endif // !defined(__cplusplus) 643 #pragma pack(pop) // revert packing alignment 644 #endif // !defined(GUID_DEFS_ONLY)