Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 582792 | Differences between
and this patch

Collapse All | Expand All

(-)a/libaudiofile/modules/SimpleModule.h (-1 / +1 lines)
Lines 123-129 struct signConverter Link Here
123
	typedef typename IntTypes<Format>::UnsignedType UnsignedType;
123
	typedef typename IntTypes<Format>::UnsignedType UnsignedType;
124
124
125
	static const int kScaleBits = (Format + 1) * CHAR_BIT - 1;
125
	static const int kScaleBits = (Format + 1) * CHAR_BIT - 1;
126
	static const int kMinSignedValue = -1 << kScaleBits;
126
	static const int kMinSignedValue = 0-(1U<<kScaleBits);
127
127
128
	struct signedToUnsigned : public std::unary_function<SignedType, UnsignedType>
128
	struct signedToUnsigned : public std::unary_function<SignedType, UnsignedType>
129
	{
129
	{
(-)a/test/FloatToInt.cpp (-1 / +1 lines)
Lines 115-121 TEST_F(FloatToIntTest, Int16) Link Here
115
		EXPECT_EQ(readData[i], expectedData[i]);
115
		EXPECT_EQ(readData[i], expectedData[i]);
116
}
116
}
117
117
118
static const int32_t kMinInt24 = -1<<23;
118
static const int32_t kMinInt24 = 0-(1U<<23);
119
static const int32_t kMaxInt24 = (1<<23) - 1;
119
static const int32_t kMaxInt24 = (1<<23) - 1;
120
120
121
TEST_F(FloatToIntTest, Int24)
121
TEST_F(FloatToIntTest, Int24)
(-)a/test/IntToFloat.cpp (-1 / +1 lines)
Lines 117-123 TEST_F(IntToFloatTest, Int16) Link Here
117
		EXPECT_EQ(readData[i], expectedData[i]);
117
		EXPECT_EQ(readData[i], expectedData[i]);
118
}
118
}
119
119
120
static const int32_t kMinInt24 = -1<<23;
120
static const int32_t kMinInt24 = 0-(1U<<23);
121
static const int32_t kMaxInt24 = (1<<23) - 1;
121
static const int32_t kMaxInt24 = (1<<23) - 1;
122
122
123
TEST_F(IntToFloatTest, Int24)
123
TEST_F(IntToFloatTest, Int24)
(-)a/test/NeXT.cpp (-7 / +7 lines)
Lines 37-49 Link Here
37
37
38
#include "TestUtilities.h"
38
#include "TestUtilities.h"
39
39
40
const char kDataUnspecifiedLength[] =
40
const signed char kDataUnspecifiedLength[] =
41
{
41
{
42
	'.', 's', 'n', 'd',
42
	'.', 's', 'n', 'd',
43
	0, 0, 0, 24, // offset of 24 bytes
43
	0, 0, 0, 24, // offset of 24 bytes
44
	0xff, 0xff, 0xff, 0xff, // unspecified length
44
	-1, -1, -1, -1, // unspecified length
45
	0, 0, 0, 3, // 16-bit linear
45
	0, 0, 0, 3, // 16-bit linear
46
	0, 0, 172, 68, // 44100 Hz
46
	0, 0, -84, 68, // 44100 Hz (0xAC44)
47
	0, 0, 0, 1, // 1 channel
47
	0, 0, 0, 1, // 1 channel
48
	0, 1,
48
	0, 1,
49
	0, 1,
49
	0, 1,
Lines 57-69 const char kDataUnspecifiedLength[] = Link Here
57
	0, 55
57
	0, 55
58
};
58
};
59
59
60
const char kDataTruncated[] =
60
const signed char kDataTruncated[] =
61
{
61
{
62
	'.', 's', 'n', 'd',
62
	'.', 's', 'n', 'd',
63
	0, 0, 0, 24, // offset of 24 bytes
63
	0, 0, 0, 24, // offset of 24 bytes
64
	0, 0, 0, 20, // length of 20 bytes
64
	0, 0, 0, 20, // length of 20 bytes
65
	0, 0, 0, 3, // 16-bit linear
65
	0, 0, 0, 3, // 16-bit linear
66
	0, 0, 172, 68, // 44100 Hz
66
	0, 0, -84, 68, // 44100 Hz (0xAC44)
67
	0, 0, 0, 1, // 1 channel
67
	0, 0, 0, 1, // 1 channel
68
	0, 1,
68
	0, 1,
69
	0, 1,
69
	0, 1,
Lines 152-164 TEST(NeXT, Truncated) Link Here
152
	ASSERT_EQ(::unlink(testFileName.c_str()), 0);
152
	ASSERT_EQ(::unlink(testFileName.c_str()), 0);
153
}
153
}
154
154
155
const char kDataZeroChannels[] =
155
const signed char kDataZeroChannels[] =
156
{
156
{
157
	'.', 's', 'n', 'd',
157
	'.', 's', 'n', 'd',
158
	0, 0, 0, 24, // offset of 24 bytes
158
	0, 0, 0, 24, // offset of 24 bytes
159
	0, 0, 0, 2, // 2 bytes
159
	0, 0, 0, 2, // 2 bytes
160
	0, 0, 0, 3, // 16-bit linear
160
	0, 0, 0, 3, // 16-bit linear
161
	0, 0, 172, 68, // 44100 Hz
161
	0, 0, -84, 68, // 44100 Hz (0xAC44)
162
	0, 0, 0, 0, // 0 channels
162
	0, 0, 0, 0, // 0 channels
163
	0, 1
163
	0, 1
164
};
164
};
(-)a/test/Sign.cpp (-2 / +1 lines)
Lines 116-122 TEST_F(SignConversionTest, Int16) Link Here
116
		EXPECT_EQ(readData[i], expectedData[i]);
116
		EXPECT_EQ(readData[i], expectedData[i]);
117
}
117
}
118
118
119
static const int32_t kMinInt24 = -1<<23;
119
static const int32_t kMinInt24 = 0-(1U<<23);
120
static const int32_t kMaxInt24 = (1<<23) - 1;
120
static const int32_t kMaxInt24 = (1<<23) - 1;
121
static const uint32_t kMaxUInt24 = (1<<24) - 1;
121
static const uint32_t kMaxUInt24 = (1<<24) - 1;
122
122
123
- 

Return to bug 582792