aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/gob/sound.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/gob/sound.cpp b/engines/gob/sound.cpp
index b390510768..4e0516722b 100644
--- a/engines/gob/sound.cpp
+++ b/engines/gob/sound.cpp
@@ -235,7 +235,7 @@ void Snd::stopSound(int16 fadeLength, SoundDesc *sndDesc) {
_fade = true;
_fadeVol = 65536;
_fadeSamples = (int) (fadeLength * (((double) _rate) / 10.0));
- _fadeVolStep = MAX(1UL, 65536 / _fadeSamples);
+ _fadeVolStep = MAX((int32) 1, (int32) (65536 / _fadeSamples));
_curFadeSamples = 0;
}
@@ -341,7 +341,7 @@ void Snd::setSample(SoundDesc &sndDesc, int16 repCount, int16 frequency,
_fade = true;
_fadeVol = 0;
_fadeSamples = (int) (fadeLength * (((double) _rate) / 10.0));
- _fadeVolStep = - (int32)MAX(1UL, 65536 / _fadeSamples);
+ _fadeVolStep = - MAX((int32) 1, (int32) (65536 / _fadeSamples));
}
}