aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel/adpcm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tinsel/adpcm.cpp')
-rw-r--r--engines/tinsel/adpcm.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/tinsel/adpcm.cpp b/engines/tinsel/adpcm.cpp
index ec51d150dc..530395d754 100644
--- a/engines/tinsel/adpcm.cpp
+++ b/engines/tinsel/adpcm.cpp
@@ -23,6 +23,9 @@
*
*/
+#include "common/stream.h"
+#include "common/util.h"
+
#include "tinsel/adpcm.h"
namespace Tinsel {
@@ -44,14 +47,14 @@ void Tinsel_ADPCMStream::readBufferTinselHeader() {
// Negate
start = ~(start | 0xC0) + 1;
- _status.predictor = 1 << start;
+ _status.predictor = (unsigned long long int)1 << start;
} else {
// Lower 6 bit are positive
// Truncate
start &= 0x1F;
- _status.predictor = ((double) 1.0) / (1 << start);
+ _status.predictor = ((double) 1.0) / ((unsigned long long int)1 << start);
}
_status.K0 = TinselFilterTable[filterVal][0];