Skip to content

Commit 5db32b7

Browse files
committed
fix: BSSoundHandle::Play + misc
1 parent 8ab9784 commit 5db32b7

3 files changed

Lines changed: 14 additions & 5 deletions

File tree

include/RE/B/BGSAudio.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace RE
44
{
55
class BGSSoundDescriptorForm;
6+
class BGSSoundOutput;
67

78
class BGSAudio
89
{
@@ -13,5 +14,12 @@ namespace RE
1314
static REL::Relocation<func_t> func{ ID::BGSAudio::GetSoundDescriptor };
1415
return func(a_formName);
1516
}
17+
18+
static const BGSSoundOutput* GetUIOutputModel()
19+
{
20+
using func_t = decltype(&BGSAudio::GetUIOutputModel);
21+
static REL::Relocation<func_t> func{ ID::BGSAudio::GetUIOutputModel };
22+
return func();
23+
}
1624
};
1725
}

include/RE/B/BSSoundHandle.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace RE
99
class BSSoundHandle
1010
{
1111
public:
12-
~BSSoundHandle() noexcept {} // NOLINT(modernize-use-equals-default)
12+
~BSSoundHandle() noexcept = default; // NOLINT(modernize-use-equals-default)
1313

1414
enum class ASSUMED_STATE : std::uint32_t
1515
{
@@ -161,9 +161,9 @@ namespace RE
161161
}
162162

163163
// members
164-
std::uint32_t soundID; // 0x0
165-
bool assumeSuccess; // 0x4
166-
std::uint8_t state; // 0x5
164+
std::uint32_t soundID{ static_cast<std::uint32_t>(-1) }; // 0x0
165+
bool assumeSuccess{ false }; // 0x4
166+
std::uint8_t state{ 0 }; // 0x5
167167
};
168168
static_assert(sizeof(BSSoundHandle) == 0x8);
169169
}

include/RE/IDs.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ namespace RE::ID
165165
namespace BGSAudio
166166
{
167167
inline constexpr REL::ID GetSoundDescriptor{ 2214758 };
168+
inline constexpr REL::ID GetUIOutputModel{ 2214800 };
168169
}
169170

170171
namespace BGSConstructibleObject
@@ -773,7 +774,7 @@ namespace RE::ID
773774
inline constexpr REL::ID IsPlaying{ 2267046 };
774775
inline constexpr REL::ID IsValid{ 2267048 };
775776
inline constexpr REL::ID Pause{ 2267044 };
776-
inline constexpr REL::ID Play{ 2276042 };
777+
inline constexpr REL::ID Play{ 2267042 };
777778
inline constexpr REL::ID PlayAfter{ 2267043 };
778779
inline constexpr REL::ID SetFrequency{ 2267059 };
779780
inline constexpr REL::ID SetFrequencyVariance{ 2267060 };

0 commit comments

Comments
 (0)