diff --git a/engines/gob/sound.cpp b/engines/gob/sound.cpp index b3905107688..4e0516722b4 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)); } }