Lines Matching refs:kNumSamples

62 constexpr int kNumSamples = 8;  variable
63 constexpr std::array<float, kNumSamples> kInputFloat = {
68 constexpr std::array<int16_t, kNumSamples> kExpectedI16 = {
72 constexpr std::array<int32_t, kNumSamples> kExpectedI32 = {
76 constexpr std::array<int32_t, kNumSamples> kExpectedI8_24 = {
94 std::array<int16_t, kNumSamples> output; in TEST()
101 for (int i = 0; i < kNumSamples; i++) { in TEST()
105 for (int i = 0; i < kNumSamples; i++) { in TEST()
111 local_convert_float_to_int16(kInputFloat.data(), output.data(), kNumSamples); in TEST()
112 for (int i = 0; i < kNumSamples; i++) { in TEST()
118 static constexpr int kNumSamples = 8; in TEST() local
119 std::array<int16_t, kNumSamples + 10> output; // larger than input in TEST()
124 sourceFloat.setData(kInputFloat.data(), kNumSamples); in TEST()
129 ASSERT_EQ(kNumSamples, numRead); in TEST()
165 std::array<int32_t, kNumSamples> output; in TEST()
172 for (int i = 0; i < kNumSamples; i++) { in TEST()
177 for (int i = 0; i < kNumSamples; i++) { in TEST()
183 std::array<int32_t, kNumSamples> output; in TEST()
186 local_convert_float_to_int32(kInputFloat.data(), output.data(), kNumSamples); in TEST()
187 for (int i = 0; i < kNumSamples; i++) { in TEST()
193 std::array<int32_t, kNumSamples + 10> output; // larger than input in TEST()
198 sourceFloat.setData(kInputFloat.data(), kNumSamples); in TEST()
203 ASSERT_EQ(kNumSamples, numRead); in TEST()
347 constexpr int kNumSamples = 101; in TEST() local
350 constexpr float kDeltaBetweenSamples = (kLastSample - kFirstSample) / (kNumSamples - 1); in TEST()
353 float input[kNumSamples]; in TEST()
354 float output[kNumSamples]; in TEST()
359 for (int i = 0; i < kNumSamples; i++) { in TEST()
375 EXPECT_NEAR(output[i], -output[kNumSamples - i - 1], kTolerance); in TEST()
422 static constexpr int kNumSamples = 8; in TEST() local
423 std::array<int16_t, kNumSamples + 10> output; // larger than input in TEST()
428 sourceFloat.setData(kInputFloat.data(), kNumSamples); in TEST()
434 int32_t numRead = sinkI16.read(output.data(), kNumSamples / 2); in TEST()
435 ASSERT_EQ(kNumSamples / 2, numRead); in TEST()
442 ASSERT_EQ(kNumSamples / 2, numRead); in TEST()
444 EXPECT_EQ(kExpectedI16.at(i + kNumSamples / 2), output.at(i)) << ", i = " << i; in TEST()
465 std::array<int32_t, kNumSamples> output; in TEST()
468 local_convert_float_to_i8_24(kInputFloat.data(), output.data(), kNumSamples); in TEST()
469 for (int i = 0; i < kNumSamples; i++) { in TEST()
475 std::array<int32_t, kNumSamples + 10> output; // larger than input in TEST()
480 sourceFloat.setData(kInputFloat.data(), kNumSamples); in TEST()
485 ASSERT_EQ(kNumSamples, numRead); in TEST()