aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorLars Persson2008-02-03 12:34:20 +0000
committerLars Persson2008-02-03 12:34:20 +0000
commitc098453ea199ff4476bd3ada90200e2b90f4de58 (patch)
treed8f14a09c43a7b184a35338f8512c29f580ec681 /sound
parentc8529408189694a0594c17a69bc560a96b6b4759 (diff)
downloadscummvm-rg350-c098453ea199ff4476bd3ada90200e2b90f4de58.tar.gz
scummvm-rg350-c098453ea199ff4476bd3ada90200e2b90f4de58.tar.bz2
scummvm-rg350-c098453ea199ff4476bd3ada90200e2b90f4de58.zip
Added template param to CLIP since implicit cast is not working 100% on all platforms. Target type is int32 so used that.
svn-id: r30760
Diffstat (limited to 'sound')
-rw-r--r--sound/adpcm.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/adpcm.cpp b/sound/adpcm.cpp
index 4455288be4..ad072af360 100644
--- a/sound/adpcm.cpp
+++ b/sound/adpcm.cpp
@@ -297,7 +297,7 @@ int16 ADPCMInputStream::decodeOKI(byte code) {
_status.last = samp;
_status.stepIndex += stepAdjust(code);
- _status.stepIndex = CLIP(_status.stepIndex, 0, ARRAYSIZE(okiStepSize) - 1);
+ _status.stepIndex = CLIP<int32>(_status.stepIndex, 0, ARRAYSIZE(okiStepSize) - 1);
// * 16 effectively converts 12-bit input to 16-bit output
return samp * 16;
@@ -326,7 +326,7 @@ int16 ADPCMInputStream::decodeMSIMA(byte code) {
_status.last = samp;
_status.stepIndex += stepAdjust(code);
- _status.stepIndex = CLIP(_status.stepIndex, 0, ARRAYSIZE(imaStepTable) - 1);
+ _status.stepIndex = CLIP<int32>(_status.stepIndex, 0, ARRAYSIZE(imaStepTable) - 1);
return samp;
}