aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorD G Turner2018-07-30 09:27:31 +0100
committerD G Turner2018-07-30 09:27:31 +0100
commit941fe1dd7e8aaaff7f5f0126799abee71726cfc5 (patch)
treed06e2237c4fa5085b370631aaa8e609204f133ef /audio
parented384a0deb93e8916313569a60967e1a294961fb (diff)
downloadscummvm-rg350-941fe1dd7e8aaaff7f5f0126799abee71726cfc5.tar.gz
scummvm-rg350-941fe1dd7e8aaaff7f5f0126799abee71726cfc5.tar.bz2
scummvm-rg350-941fe1dd7e8aaaff7f5f0126799abee71726cfc5.zip
AUDIO: Fix Compiler Shadowing Warnings.
Diffstat (limited to 'audio')
-rw-r--r--audio/mods/mod_xm_s3m.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/audio/mods/mod_xm_s3m.cpp b/audio/mods/mod_xm_s3m.cpp
index 615e587380..264dfdc46c 100644
--- a/audio/mods/mod_xm_s3m.cpp
+++ b/audio/mods/mod_xm_s3m.cpp
@@ -1095,31 +1095,31 @@ void ModXmS3mStream::updateRow() {
}
}
-int ModXmS3mStream::envelopeNextTick(Envelope &envelope, int tick, int keyOn) {
- tick++;
- if (envelope.looped && tick >= envelope.loopEndTick) {
- tick = envelope.loopStartTick;
+int ModXmS3mStream::envelopeNextTick(Envelope &envelope, int currentTick, int keyOn) {
+ int nextTick = currentTick + 1;
+ if (envelope.looped && nextTick >= envelope.loopEndTick) {
+ nextTick = envelope.loopStartTick;
}
- if (envelope.sustain && keyOn && tick >= envelope.sustainTick) {
- tick = envelope.sustainTick;
+ if (envelope.sustain && keyOn && nextTick >= envelope.sustainTick) {
+ nextTick = envelope.sustainTick;
}
- return tick;
+ return nextTick;
}
-int ModXmS3mStream::calculateAmpl(Envelope &envelope, int tick) {
+int ModXmS3mStream::calculateAmpl(Envelope &envelope, int currentTick) {
int idx, point, dt, da;
int ampl = envelope.pointsAmpl[envelope.numPoints - 1];
- if (tick < envelope.pointsTick[envelope.numPoints - 1]) {
+ if (currentTick < envelope.pointsTick[envelope.numPoints - 1]) {
point = 0;
for (idx = 1; idx < envelope.numPoints; idx++) {
- if (envelope.pointsTick[idx] <= tick) {
+ if (envelope.pointsTick[idx] <= currentTick) {
point = idx;
}
}
dt = envelope.pointsTick[point + 1] - envelope.pointsTick[point];
da = envelope.pointsAmpl[point + 1] - envelope.pointsAmpl[point];
ampl = envelope.pointsAmpl[point];
- ampl += ((da << 24) / dt) * (tick - envelope.pointsTick[point]) >> 24;
+ ampl += ((da << 24) / dt) * (currentTick - envelope.pointsTick[point]) >> 24;
}
return ampl;
}