diff options
author | Wohlstand <admin@wohlnet.ru> | 2024-05-05 23:28:16 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2024-05-05 23:28:16 +0300 |
commit | 5d80a4e766d07786856e8a8c96476c9c3de8d9c4 (patch) | |
tree | ae0f39174ae9da6cfc3a29887fcd7707dfafa421 /src/chips/opal/opal.c | |
parent | ef85a46b40f62e80ac65a69d14175d2dc29deac5 (diff) | |
download | libADLMIDI-5d80a4e766d07786856e8a8c96476c9c3de8d9c4.tar.gz libADLMIDI-5d80a4e766d07786856e8a8c96476c9c3de8d9c4.tar.bz2 libADLMIDI-5d80a4e766d07786856e8a8c96476c9c3de8d9c4.zip |
opal.c: Put content of Mult32To64 into MulDivR
Diffstat (limited to 'src/chips/opal/opal.c')
-rw-r--r-- | src/chips/opal/opal.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/chips/opal/opal.c b/src/chips/opal/opal.c index 4994e85..23cb4ff 100644 --- a/src/chips/opal/opal.c +++ b/src/chips/opal/opal.c @@ -500,14 +500,9 @@ void Opal_Pan(Opal *self, uint16_t reg_num, uint8_t pan) } -static inline int64_t s_opal_Mul32To64(int32_t a, int32_t b) -{ - return (int64_t)(a) * b; -} - static inline int32_t s_opal_MulDivR(int32_t a, int32_t b, int32_t c) { - int64_t ret = (s_opal_Mul32To64(a, b) + ( c / 2 )) / c; + int64_t ret = (((int64_t)(a) * b) + ( c / 2 )) / c; if(ret > INT_MAX) return INT_MAX; |