1 #ifndef FACT_CPP_XAPO_H
2 #define FACT_CPP_XAPO_H
3 
4 #include "com_utils.h"
5 #include <FAPO.h>
6 
7 typedef FAPORegistrationProperties XAPO_REGISTRATION_PROPERTIES;
8 typedef FAPOLockForProcessBufferParameters XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS;
9 typedef FAPOProcessBufferParameters XAPO_PROCESS_BUFFER_PARAMETERS;
10 typedef FAudioWaveFormatEx WAVEFORMATEX;
11 
12 class IXAPO : public IUnknown
13 {
14 public:
15 	COM_METHOD(HRESULT) GetRegistrationProperties (XAPO_REGISTRATION_PROPERTIES** ppRegistrationProperties) = 0;
16 	COM_METHOD(HRESULT) IsInputFormatSupported(
17 		const WAVEFORMATEX* pOutputFormat,
18 		const WAVEFORMATEX* pRequestedInputFormat,
19 		WAVEFORMATEX** ppSupportedInputFormat) = 0;
20 	COM_METHOD(HRESULT) IsOutputFormatSupported(
21 		const WAVEFORMATEX* pInputFormat,
22 		const WAVEFORMATEX* pRequestedOutputFormat,
23 		WAVEFORMATEX** ppSupportedOutputFormat) = 0;
24 	COM_METHOD(HRESULT) Initialize(const void* pData, UINT32 DataByteSize) = 0;
25 	COM_METHOD(void) Reset() = 0;
26 	COM_METHOD(HRESULT) LockForProcess(
27 		UINT32 InputLockedParameterCount,
28 		const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pInputLockedParameters,
29 		UINT32 OutputLockedParameterCount,
30 		const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pOutputLockedParameters) = 0;
31 	COM_METHOD(void) UnlockForProcess() = 0;
32 	COM_METHOD(void) Process(
33 		UINT32 InputProcessParameterCount,
34 		const XAPO_PROCESS_BUFFER_PARAMETERS* pInputProcessParameters,
35 		UINT32 OutputProcessParameterCount,
36 		XAPO_PROCESS_BUFFER_PARAMETERS* pOutputProcessParameters,
37 		BOOL IsEnabled) = 0;
38 	COM_METHOD(UINT32) CalcInputFrames(UINT32 OutputFrameCount) = 0;
39 	COM_METHOD(UINT32) CalcOutputFrames(UINT32 InputFrameCount) = 0;
40 };
41 
42 class IXAPOParameters : public IUnknown
43 {
44 public:
45 	COM_METHOD(void) SetParameters(const void* pParameters, UINT32 ParameterByteSize) = 0;
46 	COM_METHOD(void) GetParameters(void* pParameters, UINT32 ParameterByteSize) = 0;
47 };
48 
49 #endif // FACT_CPP_XAPO_H