• Home
  • Raw
  • Download

Lines Matching +full:power +full:- +full:off

8  *      http://www.apache.org/licenses/LICENSE-2.0
160 size_t frames = 100; // set to an even number (2, 4, 6 ... ) stream alternates +1, -1. in testBalance()
170 int outIndexToOffset[32] = {[0 ... 31] = -1}; in testBalance()
196 // Generate a +0.5, -0.5 alternating stream in one channel, which has variance 0.25f in testBalance()
200 *indata++ = (k == i) ? (j & 1 ? -0.5f : 0.5f) : 0; in testBalance()
204 // Add an offset to the output data - this is ignored if replace instead of accumulate. in testBalance()
205 // This must not cause the output to exceed [-1.f, 1.f] otherwise clamping will occur. in testBalance()
214 remix->process(input.data(), output.data(), frames, accumulate, inputChannelMask); in testBalance()
221 *outdata++ -= 0.5f; in testBalance()
235 // printf("power: %s %s\n", stats[0].toString().c_str(), stats[1].toString().c_str()); in testBalance()
236 double power[outChannels]; in testBalance() local
238 power[j] = stats[j].getPopVariance(); in testBalance()
241 // Check symmetric power for pair channels on exchange of front left/right position. in testBalance()
242 // to do this, we save previous power measurements. in testBalance()
247 EXPECT_NEAR_EPSILON(power[j], savedPower[pairIndex][outPair[j]]); in testBalance()
248 EXPECT_NEAR_EPSILON(power[outPair[j]], savedPower[pairIndex][j]); in testBalance()
253 savedPower[index][j] = power[j]; in testBalance()
271 EXPECT_NEAR(expectedPower, power[FL] + power[FR], POWER_TOLERANCE); in testBalance()
280 EXPECT_EQ(0.f, power[j]); in testBalance()
290 EXPECT_EQ(0.f, power[j]); in testBalance()
297 EXPECT_EQ(0.f, power[FR]); in testBalance()
302 EXPECT_NEAR_EPSILON(power[j], power[outPair[j]]); in testBalance()
306 EXPECT_NEAR(expectedPower, power[FL] + power[FR], POWER_TOLERANCE); in testBalance()
311 EXPECT_EQ(0.f, power[FL]); in testBalance()
313 EXPECT_NEAR(expectedPower, power[FR], POWER_TOLERANCE); in testBalance()
319 EXPECT_NEAR_EPSILON(power[j], power[outPair[j]]); in testBalance()
330 // The Balance test checks that the power output is symmetric with left / right channel swap.
343 ::testing::Bool() // accumulate off, on
357 // --------------------------------------------------------------------------------------
377 constexpr float kInvalid = -0.7f; in testIdentity()
390 remix->process(input.data(), output.data(), frames, false /* accumulate */, in testIdentity()
414 ::testing::Bool() // accumulate off, on
426 // --------------------------------------------------------------------------------------