CommonLibSSE (Parapets fork)
CXAPOBase.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/X/XAPO.h"
4 
5 namespace RE
6 {
7 #pragma pack(push, 8)
8 
9  class __declspec(novtable) CXAPOBase : public IXAPO
10  {
11  public:
12  inline static constexpr auto RTTI = RTTI_CXAPOBase;
13 
14  // override (IXAPO)
15  std::int32_t QueryInterface(WinAPI::REFIID a_riid, void** a_interface) override; // 00
16  std::uint32_t AddRef() override; // 01
17  std::uint32_t Release() override; // 02
18  std::int32_t GetRegistrationProperties(XAPO_REGISTRATION_PROPERTIES** a_registrationProperties) override; // 03
19  std::int32_t IsInputFormatSupported(const WAVEFORMATEX* a_outputFormat, const WAVEFORMATEX* a_requestedInputFormat, WAVEFORMATEX** a_supportedInputFormat) override; // 04
20  std::int32_t IsOutputFormatSupported(const WAVEFORMATEX* a_inputFormat, const WAVEFORMATEX* a_requestedOutputFormat, WAVEFORMATEX** a_supportedOutputFormat) override; // 05
21  std::int32_t Initialize(const void* a_data, std::uint32_t a_dataByteSize) override; // 06
22  void Reset() override; // 07
23  std::int32_t LockForProcess(std::uint32_t a_inputLockedParameterCount, const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* a_inputLockedParameters, std::uint32_t a_outputLockedParameterCount, const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* a_outputLockedParameters) override; // 08
24  void UnlockForProcess() override; // 09
25  void Process(std::uint32_t a_inputProcessParameterCount, const XAPO_PROCESS_BUFFER_PARAMETERS* a_InputProcessParameters, std::uint32_t a_outputProcessParameterCount, XAPO_PROCESS_BUFFER_PARAMETERS* a_outputProcessParameters, BOOL a_isEnabled) override; // 0A
26  std::uint32_t CalcInputFrames(std::uint32_t a_outputFrameCount) override; // 0B
27  std::uint32_t CalcOutputFrames(std::uint32_t a_inputFrameCount) override; // 0C
28 
29  // add
30  virtual std::int32_t ValidateFormatDefault(WAVEFORMATEX* a_format, BOOL a_overwrite); // 0D
31  virtual ~CXAPOBase(); // 0E
32 
33  [[nodiscard]] const XAPO_REGISTRATION_PROPERTIES* GetRegistrationPropertiesInternal() const noexcept { return registrationProperties; }
34  [[nodiscard]] BOOL IsLocked() const noexcept { return isLocked; }
35 
36  // members
37  const XAPO_REGISTRATION_PROPERTIES* registrationProperties; // 08 - pointer to registration properties of the XAPO, set via constructor
38  void* fnMatrixMixFunction; // 10 - optimal matrix function pointer, used for thru processing
39  float* matrixCoefficients; // 18 - matrix coefficient table, used for thru processing
40  std::uint32_t srcFormatType; // 20 - input format type, used for thru processing
41  BOOL isScalarMatrix; // 24 - true if matrixCoefficients is diagonal matrix with all main diagonal entries equal, i.e. fnMatrixMixFunction only used for type conversion (no channel conversion), used for thru processing
42  BOOL isLocked; // 28 - true if XAPO locked via CXAPOBase.LockForProcess
43  std::int32_t referenceCount; // 2C - COM reference count, must be aligned for atomic operations
44  };
45  static_assert(sizeof(CXAPOBase) == 0x30);
46 
47 #pragma pack(pop)
48 }
constexpr REL::ID Reset(26586)
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_CXAPOBase
Definition: Offsets_RTTI.h:3698
tWAVEFORMATEX WAVEFORMATEX
Definition: AudioDefs.h:18
std::int32_t BOOL
Definition: XAPO.h:8
Definition: WinAPI.h:90