CommonLibSSE (Parapets fork)
BSXAudio2Audio.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/A/AudioDefs.h"
4 #include "RE/B/BSAudio.h"
5 #include "RE/C/CXAPOBase.h"
6 #include "RE/X/X3DAudio.h"
7 
8 namespace RE
9 {
10  struct IXAudio2;
11  struct IXAudio2MasteringVoice;
12  struct IXAudio2SubmixVoice;
13 
14  class BSXAudio2Audio : public BSAudio
15  {
16  public:
17  inline static constexpr auto RTTI = RTTI_BSXAudio2Audio;
18 
19  ~BSXAudio2Audio() override; // 00
20 
21  // override (BSAudio)
22  bool Init(WinAPI::HWND* a_wnd) override; // 01
23  void Shutdown() override; // 02
24  BSGameSound* GetGameSound(const BSResource::ID& a_resourceID) override; // 03
25  void ReleaseGameSound(BSGameSound* a_gameSound) override; // 04
26  const BSFixedString& GetSystemName() override; // 05
27  void ApplyReverbType(const BSIReverbType* a_reverbType, std::uint32_t a_tickLength) override; // 07
28  std::uint32_t CreateMonitor() override; // 08
29  void ReleaseMonitor(std::uint32_t a_monitor) override; // 09
30  BSAudioMonitor::Receiver GetReceiver(std::uint32_t a_monitor) override; // 0A
31 
32  // members
34  std::uint32_t unk44; // 44
35  std::uint64_t unk48; // 48
36  IXAudio2* XAudio; // 50
37  IXAudio2MasteringVoice* masteringVoice; // 58
39  std::uint32_t speakerChannels; // 74
40  };
41  static_assert(sizeof(BSXAudio2Audio) == 0x78);
42 
43  class MonitorAPO : public CXAPOBase
44  {
45  public:
46  inline static constexpr auto RTTI = RTTI___MonitorAPO;
47 
48  ~MonitorAPO() override; // 0E
49 
50  // override (CXAPOBase)
51  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
52  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
53 
54  // members
55  std::uint32_t numChannels; // 30
56  float amplitude; // 34
57  };
58  static_assert(sizeof(MonitorAPO) == 0x38);
59 
61  {
62  public:
63  // members
65  IXAudio2SubmixVoice* submixVoice; // 08
66  };
67  static_assert(sizeof(XAudio2Monitor) == 0x10);
68 }
Definition: BSAudioMonitor.h:25
Definition: BSAudio.h:18
Definition: BSGameSound.h:16
Definition: BSIReverbType.h:6
Definition: BSXAudio2Audio.h:15
~BSXAudio2Audio() override
std::uint32_t CreateMonitor() override
void ReleaseMonitor(std::uint32_t a_monitor) override
void ApplyReverbType(const BSIReverbType *a_reverbType, std::uint32_t a_tickLength) override
std::uint64_t unk48
Definition: BSXAudio2Audio.h:35
bool Init(WinAPI::HWND *a_wnd) override
BSAudioMonitor::Receiver GetReceiver(std::uint32_t a_monitor) override
static constexpr auto RTTI
Definition: BSXAudio2Audio.h:17
X3DAUDIO_HANDLE X3DAudioHandle
Definition: BSXAudio2Audio.h:38
void ReleaseGameSound(BSGameSound *a_gameSound) override
WAVEFORMATEXTENSIBLE outputFormat
Definition: BSXAudio2Audio.h:33
IXAudio2 * XAudio
Definition: BSXAudio2Audio.h:36
std::uint32_t speakerChannels
Definition: BSXAudio2Audio.h:39
IXAudio2MasteringVoice * masteringVoice
Definition: BSXAudio2Audio.h:37
const BSFixedString & GetSystemName() override
std::uint32_t unk44
Definition: BSXAudio2Audio.h:34
BSGameSound * GetGameSound(const BSResource::ID &a_resourceID) override
void Shutdown() override
Definition: BSXAudio2Audio.h:44
~MonitorAPO() override
static constexpr auto RTTI
Definition: BSXAudio2Audio.h:46
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
std::uint32_t numChannels
Definition: BSXAudio2Audio.h:55
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
float amplitude
Definition: BSXAudio2Audio.h:56
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_BSXAudio2Audio
Definition: Offsets_RTTI.h:3654
constexpr REL::ID RTTI___MonitorAPO
Definition: Offsets_RTTI.h:6322
std::byte[20] X3DAUDIO_HANDLE
Definition: X3DAudio.h:12
std::int32_t BOOL
Definition: XAPO.h:8
HWND__ * HWND
Definition: WinAPI.h:37
Definition: ID.h:10
Definition: AudioDefs.h:21
Definition: BSXAudio2Audio.h:61
MonitorAPO * monitorAPO
Definition: BSXAudio2Audio.h:64
IXAudio2SubmixVoice * submixVoice
Definition: BSXAudio2Audio.h:65