|
|
852130 |
diff -Nurb --strip-trailing-cr audiofile-0.3.6-orig/libaudiofile/modules/SimpleModule.h audiofile-0.3.6/libaudiofile/modules/SimpleModule.h
|
|
|
852130 |
--- audiofile-0.3.6-orig/libaudiofile/modules/SimpleModule.h 2013-03-06 06:30:03.000000000 +0100
|
|
|
852130 |
+++ audiofile-0.3.6/libaudiofile/modules/SimpleModule.h 2016-02-03 21:19:43.065454454 +0100
|
|
|
852130 |
@@ -123,7 +123,7 @@
|
|
|
852130 |
typedef typename IntTypes<Format>::UnsignedType UnsignedType;
|
|
|
852130 |
|
|
|
852130 |
static const int kScaleBits = (Format + 1) * CHAR_BIT - 1;
|
|
|
852130 |
- static const int kMinSignedValue = -1 << kScaleBits;
|
|
|
852130 |
+ static const int kMinSignedValue = 0-(1U<
|
|
|
852130 |
|
|
|
852130 |
struct signedToUnsigned : public std::unary_function<SignedType, UnsignedType>
|
|
|
852130 |
{
|
|
|
852130 |
diff -Nurb --strip-trailing-cr audiofile-0.3.6-orig/test/FloatToInt.cpp audiofile-0.3.6/test/FloatToInt.cpp
|
|
|
852130 |
--- audiofile-0.3.6-orig/test/FloatToInt.cpp 2013-02-11 18:23:26.000000000 +0100
|
|
|
852130 |
+++ audiofile-0.3.6/test/FloatToInt.cpp 2016-02-03 21:21:14.714510229 +0100
|
|
|
852130 |
@@ -115,7 +115,7 @@
|
|
|
852130 |
EXPECT_EQ(readData[i], expectedData[i]);
|
|
|
852130 |
}
|
|
|
852130 |
|
|
|
852130 |
-static const int32_t kMinInt24 = -1<<23;
|
|
|
852130 |
+static const int32_t kMinInt24 = 0-(1U<<23);
|
|
|
852130 |
static const int32_t kMaxInt24 = (1<<23) - 1;
|
|
|
852130 |
|
|
|
852130 |
TEST_F(FloatToIntTest, Int24)
|
|
|
852130 |
diff -Nurb --strip-trailing-cr audiofile-0.3.6-orig/test/IntToFloat.cpp audiofile-0.3.6/test/IntToFloat.cpp
|
|
|
852130 |
--- audiofile-0.3.6-orig/test/IntToFloat.cpp 2013-02-11 18:23:26.000000000 +0100
|
|
|
852130 |
+++ audiofile-0.3.6/test/IntToFloat.cpp 2016-02-03 21:20:57.380445355 +0100
|
|
|
852130 |
@@ -117,7 +117,7 @@
|
|
|
852130 |
EXPECT_EQ(readData[i], expectedData[i]);
|
|
|
852130 |
}
|
|
|
852130 |
|
|
|
852130 |
-static const int32_t kMinInt24 = -1<<23;
|
|
|
852130 |
+static const int32_t kMinInt24 = 0-(1U<<23);
|
|
|
852130 |
static const int32_t kMaxInt24 = (1<<23) - 1;
|
|
|
852130 |
|
|
|
852130 |
TEST_F(IntToFloatTest, Int24)
|
|
|
852130 |
diff -Nurb --strip-trailing-cr audiofile-0.3.6-orig/test/Sign.cpp audiofile-0.3.6/test/Sign.cpp
|
|
|
852130 |
--- audiofile-0.3.6-orig/test/Sign.cpp 2013-02-11 18:23:26.000000000 +0100
|
|
|
852130 |
+++ audiofile-0.3.6/test/Sign.cpp 2016-02-03 21:20:38.742450826 +0100
|
|
|
852130 |
@@ -116,7 +116,7 @@
|
|
|
852130 |
EXPECT_EQ(readData[i], expectedData[i]);
|
|
|
852130 |
}
|
|
|
852130 |
|
|
|
852130 |
-static const int32_t kMinInt24 = -1<<23;
|
|
|
852130 |
+static const int32_t kMinInt24 = 0-(1U<<23);
|
|
|
852130 |
static const int32_t kMaxInt24 = (1<<23) - 1;
|
|
|
852130 |
static const uint32_t kMaxUInt24 = (1<<24) - 1;
|
|
|
852130 |
|