Move muldiv7 to SSEQPlayer's common.h.
(Basically I was using the same function in 2 files and why do that when I could make it a common thing.)
--- a/src/in_ncsf/SSEQPlayer/common.h
+++ b/src/in_ncsf/SSEQPlayer/common.h
@@ -127,6 +127,11 @@
{
std::string arrHeader = std::string(&arr[0], &arr[N]);
return arrHeader == header;
+}
+
+inline std::int32_t muldiv7(std::int32_t val, std::uint8_t mul)
+{
+ return mul == 127 ? val : ((val * mul) >> 7);
}
/*
--- a/src/in_ncsf/XSFConfig_NCSF.cpp
+++ b/src/in_ncsf/XSFConfig_NCSF.cpp
@@ -231,11 +231,6 @@
}
}
-static inline std::int32_t muldiv7(std::int32_t val, std::uint8_t mul)
-{
- return mul == 127 ? val : ((val * mul) >> 7);
-}
-
void XSFConfig_NCSF::RefreshSoundView()
{
auto player = this->soundViewData->player;
--- a/src/in_ncsf/XSFPlayer_NCSF.cpp
+++ b/src/in_ncsf/XSFPlayer_NCSF.cpp
@@ -156,11 +156,6 @@
return XSFPlayer::Load();
}
-static inline std::int32_t muldiv7(std::int32_t val, std::uint8_t mul)
-{
- return mul == 127 ? val : ((val * mul) >> 7);
-}
-
void XSFPlayer_NCSF::GenerateSamples(std::vector<std::uint8_t> &buf, unsigned offset, unsigned samples)
{
unsigned long mute = this->mutes.to_ulong();