CommonLibSSE (Parapets fork)
BSXAudio2GameSound.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSGameSound.h"
6 #include "RE/X/X3DAudio.h"
7 
8 namespace RE
9 {
10  class BSXAudio2Audio;
11  struct IXAudio2SourceVoice;
12 
14  public BSGameSound, // 000
15  public IXAudio2VoiceCallback // 0C8
16  {
17  public:
18  inline static constexpr auto RTTI = RTTI_BSXAudio2GameSound;
19 
20  // override (BSGameSound)
21  void OutputModelChangedImpl() override; // 00
22 
23  ~BSXAudio2GameSound() override; // 01
24 
25  std::uint32_t GetCurrentPlaybackPosition() const override; // 04
26  bool SyncOpen() override; // 06
27  bool StartAsyncOpen() override; // 07
28  bool TestAsyncOpenReady() override; // 08
29  bool FinishAsyncOpen() override; // 09
30  bool HandleExternalOpen() override; // 0A
31  bool Prepare() override; // 0B
32  void Copy(BSGameSound* a_other, bool a_update) override; // 0C
33  void UpdateEmitterPosition() override; // 0D
34  bool Update() override; // 0E
35  void SetEmitterPositionImpl(const NiPoint3& a_position) override; // 0F
36  void GetEmitterPositionImpl(NiPoint3& a_position) const override; // 10
37  void Unk_11(float a_arg1, float a_arg2) override; // 11
38  void SetAttenuationCurve(std::uint16_t a_val1, std::uint16_t a_val2, std::uint16_t a_val3, std::uint16_t a_val4, std::uint16_t a_val5) override; // 12
39  void DoApplyFrequency() override; // 13
40  void Seek(std::uint32_t a_milliseconds) override; // 14
41  void PlayImpl() override; // 15
42  void PauseImpl() override; // 16
43  void StopImpl() override; // 17
44  void SetVolumeImpl() override; // 18
45 
46  [[nodiscard]] static BSXAudio2Audio* GetAudioImplementation();
47  static void SetAudioImplementation(BSXAudio2Audio* a_impl);
48 
49  void SeekInSamples(std::uint32_t a_samples);
50 
51  // members
53  std::uint32_t buffersSubmitted; // 0D8
54  std::uint16_t buffersQueued; // 0DC
55  std::uint16_t packetIndex; // 0DE
58  std::uint32_t lastUpdateTime; // 11C
59  std::uint32_t samplesPlayed; // 120
60  std::uint32_t playbackPosition; // 124
61  IXAudio2SourceVoice* sourceVoice; // 128
65  std::uint32_t dataOffset; // 208
66  std::byte pad20C[4]; // 20C
68  };
69  static_assert(sizeof(BSXAudio2GameSound) == 0x220);
70 }
Definition: BSGameSound.h:16
Definition: BSXAudio2Audio.h:15
Definition: BSXAudio2DataSrc.h:26
Definition: BSXAudio2GameSound.h:16
static BSXAudio2Audio * GetAudioImplementation()
void StopImpl() override
bool Prepare() override
void SetEmitterPositionImpl(const NiPoint3 &a_position) override
void SetAttenuationCurve(std::uint16_t a_val1, std::uint16_t a_val2, std::uint16_t a_val3, std::uint16_t a_val4, std::uint16_t a_val5) override
void GetEmitterPositionImpl(NiPoint3 &a_position) const override
std::uint32_t buffersSubmitted
Definition: BSXAudio2GameSound.h:53
void Copy(BSGameSound *a_other, bool a_update) override
void DoApplyFrequency() override
X3DAUDIO_DISTANCE_CURVE_POINT curvePoints[6]
Definition: BSXAudio2GameSound.h:57
static constexpr auto RTTI
Definition: BSXAudio2GameSound.h:18
X3DAUDIO_DSP_SETTINGS dspSettings
Definition: BSXAudio2GameSound.h:62
bool SyncOpen() override
std::uint32_t GetCurrentPlaybackPosition() const override
std::uint32_t lastUpdateTime
Definition: BSXAudio2GameSound.h:58
std::uint16_t packetIndex
Definition: BSXAudio2GameSound.h:55
void OutputModelChangedImpl() override
std::byte pad20C[4]
Definition: BSXAudio2GameSound.h:66
BSXAudio2DataSrc::StreamPacket * streamPackets[2]
Definition: BSXAudio2GameSound.h:67
IXAudio2SourceVoice * sourceVoice
Definition: BSXAudio2GameSound.h:61
void Seek(std::uint32_t a_milliseconds) override
~BSXAudio2GameSound() override
void UpdateEmitterPosition() override
X3DAUDIO_DISTANCE_CURVE volumeCurve
Definition: BSXAudio2GameSound.h:56
std::uint32_t playbackPosition
Definition: BSXAudio2GameSound.h:60
void Unk_11(float a_arg1, float a_arg2) override
bool StartAsyncOpen() override
X3DAUDIO_EMITTER emitter
Definition: BSXAudio2GameSound.h:63
bool TestAsyncOpenReady() override
bool HandleExternalOpen() override
BSXAudio2DataSrc * src
Definition: BSXAudio2GameSound.h:52
X3DAUDIO_CONE cone
Definition: BSXAudio2GameSound.h:64
void SeekInSamples(std::uint32_t a_samples)
bool Update() override
std::uint16_t buffersQueued
Definition: BSXAudio2GameSound.h:54
void PauseImpl() override
static void SetAudioImplementation(BSXAudio2Audio *a_impl)
std::uint32_t samplesPlayed
Definition: BSXAudio2GameSound.h:59
void SetVolumeImpl() override
bool FinishAsyncOpen() override
std::uint32_t dataOffset
Definition: BSXAudio2GameSound.h:65
void PlayImpl() override
Definition: NiPoint3.h:6
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_BSXAudio2GameSound
Definition: Offsets_RTTI.h:3657
Definition: BSXAudio2DataSrc.h:31
Definition: X3DAudio.h:56
Definition: X3DAudio.h:17
Definition: X3DAudio.h:37
Definition: X3DAudio.h:141
Definition: X3DAudio.h:113