Skip to content

Commit b88a88a

Browse files
authored
Clean Up + Fixes for some C/C++ compilers.
1 parent 1a78e71 commit b88a88a

File tree

3 files changed

+128
-221
lines changed

3 files changed

+128
-221
lines changed

CriCodecs/adx.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ bool Decode(int *d,unsigned char *s, AdxHeader header, int* coeffs){
128128
scale = 1 << (12 - scale);
129129
}else if(header.encoding == 2){
130130
scale = (scale & 0x1fff) + 1;
131-
static const signed short static_coeffs[8] = {0x0000,0x0000,0x0F00,0x0000,0x1CC0,0xF300,0x1880,0xF240};
131+
static const signed short static_coeffs[8] = {0x0000,0x0000,0x0F00,0x0000,0x1CC0,(signed short)0xF300,0x1880,(signed short)0xF240};
132132
coeffs[0] = static_coeffs[predictor*2 + 0];
133133
coeffs[1] = static_coeffs[predictor*2 + 1];
134134
}else{
@@ -239,7 +239,7 @@ static PyObject* AdxEncode(PyObject* self, PyObject* args){
239239
int* coeffs = new int [2];
240240
coeffs = CalculateCoefficients(coeffs, highpass_freq, header.fmtSamplingRate);
241241
if((Filter == 0 || Filter == 1 || Filter == 2 || Filter == 3) && highpass_freq == 0 && encoding_ver == 2){
242-
static const signed short static_coeffs[8] = {0x0000,0x0000,0x0F00,0x0000,0x1CC0,0xF300,0x1880,0xF240};
242+
static const signed short static_coeffs[8] = {0x0000,0x0000,0x0F00,0x0000,0x1CC0,(signed short)0xF300,0x1880,(signed short)0xF240};
243243
coeffs[0] = static_coeffs[Filter*2 + 0];
244244
coeffs[1] = static_coeffs[Filter*2 + 1];
245245
}

0 commit comments

Comments
 (0)