CommonLibSSE (Parapets fork)
IXAudio2Voice.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/X/XAudio2.h"
4 
5 namespace RE
6 {
7  struct __declspec(novtable) IXAudio2Voice
8  {
9  public:
10  virtual void GetVoiceDetails(XAUDIO2_VOICE_DETAILS* a_voiceDetails) = 0; // 00
11 
12  virtual std::int32_t SetOutputVoices(const XAUDIO2_VOICE_SENDS* a_sendList) = 0; // 01
13 
14  virtual std::int32_t SetEffectChain(const XAUDIO2_EFFECT_CHAIN* a_effectChain) = 0; // 02
15 
16  virtual std::int32_t EnableEffect(
17  std::uint32_t a_effectIndex,
18  std::uint32_t a_operationSet = XAUDIO2_COMMIT_NOW) = 0; // 03
19 
20  virtual std::int32_t DisableEffect(
21  std::uint32_t a_effectIndex,
22  std::uint32_t a_operationSet = XAUDIO2_COMMIT_NOW) = 0; // 04
23 
24  virtual void GetEffectState(std::uint32_t a_effectIndex, BOOL* a_enabled) = 0; // 05
25 
26  virtual std::int32_t SetEffectParameters(
27  std::uint32_t a_effectIndex,
28  const void* a_parameters,
29  std::uint32_t a_parametersByteSize,
30  std::uint32_t a_operationSet = XAUDIO2_COMMIT_NOW) = 0; // 06
31 
32  virtual std::int32_t GetEffectParameters(
33  std::uint32_t a_effectIndex,
34  void* a_parameters,
35  std::uint32_t a_parametersByteSize) = 0; // 07
36 
37  virtual std::int32_t SetFilterParameters(
38  const XAUDIO2_FILTER_PARAMETERS* a_parameters,
39  std::uint32_t a_operationSet = XAUDIO2_COMMIT_NOW) = 0; // 08
40 
41  virtual void GetFilterParameters(XAUDIO2_FILTER_PARAMETERS* a_parameters) = 0; // 09
42 
43  virtual std::int32_t SetOutputFilterParameters(
44  IXAudio2Voice* a_destinationVoice,
45  const XAUDIO2_FILTER_PARAMETERS* a_parameters,
46  std::uint32_t a_operationSet = XAUDIO2_COMMIT_NOW) = 0; // 0A
47 
48  virtual void GetOutputFilterParameters(
49  IXAudio2Voice* a_destinationVoice,
50  XAUDIO2_FILTER_PARAMETERS* a_parameters) = 0; // 0B
51 
52  virtual std::int32_t SetVolume(
53  float a_volume,
54  std::uint32_t a_operationSet = XAUDIO2_COMMIT_NOW) = 0; // 0C
55 
56  virtual void GetVolume(float* a_volume) = 0; // 0D
57 
58  virtual std::int32_t SetChannelVolumes(
59  std::uint32_t a_channels, const float* a_volumes,
60  std::uint32_t a_operationSet = XAUDIO2_COMMIT_NOW) = 0; // 0E
61 
62  virtual void GetChannelVolumes(std::uint32_t a_channels, float* a_volumes) = 0; // 0F
63 
64  virtual std::int32_t SetOutputMatrix(
65  IXAudio2Voice* a_destinationVoice,
66  std::uint32_t a_sourceChannels, std::uint32_t a_destinationChannels,
67  const float* a_levelMatrix,
68  std::uint32_t a_operationSet = XAUDIO2_COMMIT_NOW) = 0; // 10
69 
70  virtual void GetOutputMatrix(
71  IXAudio2Voice* a_destinationVoice,
72  std::uint32_t a_sourceChannels, std::uint32_t a_destinationChannels,
73  float* a_levelMatrix) = 0; // 11
74 
75  virtual void DestroyVoice() = 0; // 12
76  };
77 
78  struct __declspec(novtable) IXAudio2SourceVoice : public IXAudio2Voice
79  {
80  public:
81  virtual std::int32_t Start(std::uint32_t a_flags = 0, std::uint32_t a_operationSet = XAUDIO2_COMMIT_NOW) = 0; // 13
82 
83  virtual std::int32_t Stop(std::uint32_t a_flags = 0, std::uint32_t a_operationSet = XAUDIO2_COMMIT_NOW) = 0; // 14
84 
85  virtual std::int32_t SubmitSourceBuffer(const XAUDIO2_BUFFER* a_buffer, const XAUDIO2_BUFFER_WMA* a_bufferWMA = nullptr) = 0; // 15
86 
87  virtual std::int32_t FlushSourceBuffers() = 0; // 16
88 
89  virtual std::int32_t Discontinuity() = 0; // 17
90 
91  virtual std::int32_t ExitLoop(std::uint32_t a_operationSet = XAUDIO2_COMMIT_NOW) = 0; // 18
92 
93  virtual void GetState(XAUDIO2_VOICE_STATE* a_voiceState) = 0; // 19
94 
95  virtual std::int32_t SetFrequencyRatio(
96  float a_ratio,
97  std::uint32_t a_operationSet = XAUDIO2_COMMIT_NOW) = 0; // 1A
98 
99  virtual void GetFrequencyRatio(float* a_ratio) = 0; // 1B
100 
101  virtual std::int32_t SetSourceSampleRate(std::uint32_t a_newSourceSampleRate) = 0; // 1C
102  };
103 
104  struct __declspec(novtable) IXAudio2SubmixVoice : public IXAudio2Voice
105  {
106  public:
107  };
108 
109  struct __declspec(novtable) IXAudio2MasteringVoice : public IXAudio2Voice
110  {
111  public:
112  };
113 }
constexpr REL::ID Stop(static_cast< std::uint64_t >(67619))
constexpr REL::ID Start(static_cast< std::uint64_t >(70817))
Definition: AbsorbEffect.h:6
constexpr auto XAUDIO2_COMMIT_NOW
Definition: XAudio2.h:28
std::int32_t BOOL
Definition: XAPO.h:8