aboutsummaryrefslogtreecommitdiff
path: root/audio/mods/mod_xm_s3m.cpp
diff options
context:
space:
mode:
authorThierry Crozat2017-09-11 21:38:58 +0100
committerThierry Crozat2017-09-11 21:38:58 +0100
commit5d419c2b58841b2bc56c40caebab5e38622dee88 (patch)
tree8414a16c61b6393d9cef5bd6eba146fac5e183cb /audio/mods/mod_xm_s3m.cpp
parenta2bafbbe76bb481029e4b6dd29d4777f55f6d569 (diff)
downloadscummvm-rg350-5d419c2b58841b2bc56c40caebab5e38622dee88.tar.gz
scummvm-rg350-5d419c2b58841b2bc56c40caebab5e38622dee88.tar.bz2
scummvm-rg350-5d419c2b58841b2bc56c40caebab5e38622dee88.zip
AUDIO: Rename two functions in ModuleModXmS3m
This is an attempt to fix a compilation error on some platforms. The error message seems to indicate that log2 might be a define on thos platforms. Note that the log2 implementation in ModuleModXmS3m is not the binary logarithm, and we cannot use Common::intLog2.
Diffstat (limited to 'audio/mods/mod_xm_s3m.cpp')
-rw-r--r--audio/mods/mod_xm_s3m.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/audio/mods/mod_xm_s3m.cpp b/audio/mods/mod_xm_s3m.cpp
index fdacbbbadc..615e587380 100644
--- a/audio/mods/mod_xm_s3m.cpp
+++ b/audio/mods/mod_xm_s3m.cpp
@@ -665,7 +665,7 @@ void ModXmS3mStream::trigger(Channel &channel) {
if (_module.linearPeriods) {
channel.portaPeriod = 7744 - period;
} else {
- channel.portaPeriod = 29021 * ModuleModXmS3m::exp2((period << FP_SHIFT) / -768) >> FP_SHIFT;
+ channel.portaPeriod = 29021 * ModuleModXmS3m::moduleExp2((period << FP_SHIFT) / -768) >> FP_SHIFT;
}
if (!porta) {
channel.period = channel.portaPeriod;
@@ -720,12 +720,12 @@ void ModXmS3mStream::calculateFreq(Channel &channel) {
if (per < 28 || per > 7680) {
per = 7680;
}
- channel.freq = ((_module.c2Rate >> 4) * ModuleModXmS3m::exp2(((4608 - per) << FP_SHIFT) / 768)) >> (FP_SHIFT - 4);
+ channel.freq = ((_module.c2Rate >> 4) * ModuleModXmS3m::moduleExp2(((4608 - per) << FP_SHIFT) / 768)) >> (FP_SHIFT - 4);
} else {
if (per > 29021) {
per = 29021;
}
- per = (per << FP_SHIFT) / ModuleModXmS3m::exp2((channel.arpeggioAdd << FP_SHIFT) / 12);
+ per = (per << FP_SHIFT) / ModuleModXmS3m::moduleExp2((channel.arpeggioAdd << FP_SHIFT) / 12);
if (per < 28) {
per = 29021;
}