aboutsummaryrefslogtreecommitdiff
path: root/audio/decoders
diff options
context:
space:
mode:
authorBastien Bouclet2017-09-24 18:20:13 +0200
committerBastien Bouclet2017-09-30 21:35:16 +0200
commit9db2953ca38b391470019ed427070ed425cc5084 (patch)
tree4d4e23197ca1688961d4adf09fbb2a5806f75e2d /audio/decoders
parent86573a8eaf477324e836782dfe3ec8ee5a65d28f (diff)
downloadscummvm-rg350-9db2953ca38b391470019ed427070ed425cc5084.tar.gz
scummvm-rg350-9db2953ca38b391470019ed427070ed425cc5084.tar.bz2
scummvm-rg350-9db2953ca38b391470019ed427070ed425cc5084.zip
AUDIO: QDM2: Use the shared int64 type instead of a custom one
Diffstat (limited to 'audio/decoders')
-rw-r--r--audio/decoders/qdm2.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/audio/decoders/qdm2.cpp b/audio/decoders/qdm2.cpp
index b8d007da51..4454fd08c9 100644
--- a/audio/decoders/qdm2.cpp
+++ b/audio/decoders/qdm2.cpp
@@ -233,11 +233,6 @@ private:
bool qdm2_decodeFrame(Common::SeekableReadStream &in, QueuingAudioStream *audioStream);
};
-// Fix compilation for non C99-compliant compilers, like MSVC
-#ifndef int64_t
-typedef signed long long int int64_t;
-#endif
-
#define QDM2_LIST_ADD(list, size, packet) \
do { \
if (size > 0) \
@@ -323,7 +318,7 @@ static inline uint16 round_sample(int *sum) {
}
static inline int MULH(int a, int b) {
- return ((int64_t)(a) * (int64_t)(b))>>32;
+ return ((int64)(a) * (int64)(b))>>32;
}
// signed 16x16 -> 32 multiply add accumulate
@@ -894,9 +889,8 @@ void QDM2Stream::rndTableInit(void) {
uint16 i;
uint16 j;
uint32 ldw, hdw;
- // TODO: Replace Code with uint64 less version...
- int64_t tmp64_1;
- int64_t random_seed = 0;
+ int64 tmp64_1;
+ int64 random_seed = 0;
float delta = 1.0 / 16384.0;
for(i = 0; i < ARRAYSIZE(_noiseTable); i++) {
@@ -912,7 +906,7 @@ void QDM2Stream::rndTableInit(void) {
ldw = (uint32)ldw % (uint32)random_seed;
tmp64_1 = (random_seed * 0x55555556);
hdw = (uint32)(tmp64_1 >> 32);
- random_seed = (int64_t)(hdw + (ldw >> 31));
+ random_seed = (int64)(hdw + (ldw >> 31));
}
}
@@ -1490,8 +1484,7 @@ void QDM2Stream::fill_coding_method_array(sb_int8_array tone_level_idx, sb_int8_
int ch, sb, j;
int tmp, acc, esp_40, comp;
int add1, add2, add3, add4;
- // TODO : Remove multres 64 bit variable necessity...
- int64_t multres;
+ int64 multres;
// This should never happen
if (nb_channels <= 0)