diff options
author | Max Horn | 2005-12-09 22:04:28 +0000 |
---|---|---|
committer | Max Horn | 2005-12-09 22:04:28 +0000 |
commit | 3107d08f271f9606210dca05db72ace13fe37afc (patch) | |
tree | 93b6889e5481f336f57da270c2c01532b0b632b1 /sound | |
parent | e0e1dcda08ba26674e3f988594535ce542f44925 (diff) | |
download | scummvm-rg350-3107d08f271f9606210dca05db72ace13fe37afc.tar.gz scummvm-rg350-3107d08f271f9606210dca05db72ace13fe37afc.tar.bz2 scummvm-rg350-3107d08f271f9606210dca05db72ace13fe37afc.zip |
Unified IMA code a little bit
svn-id: r19767
Diffstat (limited to 'sound')
-rw-r--r-- | sound/adpcm.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/adpcm.cpp b/sound/adpcm.cpp index bae635547e..e777a243b2 100644 --- a/sound/adpcm.cpp +++ b/sound/adpcm.cpp @@ -166,8 +166,8 @@ int16 ADPCMInputStream::decodeOKI(byte code) { _status.stepIndex += stepAdjust(code); if (_status.stepIndex < 0) _status.stepIndex = 0; - if (_status.stepIndex > 48) - _status.stepIndex = 48; + if (_status.stepIndex > ARRAYSIZE(okiStepSize) - 1) + _status.stepIndex = ARRAYSIZE(okiStepSize) - 1; // * 16 effectively converts 12-bit input to 16-bit output return samp * 16; @@ -213,8 +213,8 @@ int16 ADPCMInputStream::decodeMSIMA(byte code) { _status.stepIndex += stepAdjust(code); if (_status.stepIndex < 0) _status.stepIndex = 0; - if (_status.stepIndex > 88) - _status.stepIndex = 88; + if (_status.stepIndex > ARRAYSIZE(imaStepTable) - 1) + _status.stepIndex = ARRAYSIZE(imaStepTable) - 1; return samp; } |