Skip to content

Commit

Permalink
Merge pull request #101 from W-Drew/po3-sse-sound-pause
Browse files Browse the repository at this point in the history
RE BSSoundHandle::Pause()
  • Loading branch information
powerof3 authored Jan 12, 2024
2 parents abf5e00 + 5106e57 commit 573b349
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/RE/B/BSSoundHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ namespace RE
bool SetVolume(float a_volume);
bool Stop();
bool Play();
bool Pause();

// members
std::uint32_t soundID; // 00
Expand Down
2 changes: 2 additions & 0 deletions include/RE/Offsets.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ namespace RE
inline constexpr REL::ID Play(static_cast<std::uint64_t>(67616));
inline constexpr REL::ID SetObjectToFollow(static_cast<std::uint64_t>(67636));
inline constexpr REL::ID SetPosition(static_cast<std::uint64_t>(67631));
inline constexpr REL::ID Pause(static_cast<std::uint64_t>(67618));
inline constexpr REL::ID Stop(static_cast<std::uint64_t>(67619));
}

Expand Down Expand Up @@ -726,6 +727,7 @@ namespace RE
inline constexpr REL::ID Play(static_cast<std::uint64_t>(66355));
inline constexpr REL::ID SetObjectToFollow(static_cast<std::uint64_t>(66375));
inline constexpr REL::ID SetPosition(static_cast<std::uint64_t>(66370));
inline constexpr REL::ID Pause(static_cast<std::uint64_t>(66357));
inline constexpr REL::ID Stop(static_cast<std::uint64_t>(66358));
}

Expand Down
7 changes: 7 additions & 0 deletions src/RE/B/BSSoundHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,11 @@ namespace RE
REL::Relocation<func_t> func{ Offset::BSSoundHandle::Play };
return func(this);
}

bool BSSoundHandle::Pause()
{
using func_t = decltype(&BSSoundHandle::Pause);
REL::Relocation<func_t> func{ Offset::BSSoundHandle::Pause };
return func(this);
}
}

0 comments on commit 573b349

Please sign in to comment.