src/media/audio/audio_core/mixer/test/mixer_bitwise_tests.cc
// Does NoOp mixer behave as expected? (not update offsets, nor touch buffers)
Does NoOp mixer behave as expected. (not update offsets, nor touch buffers)
Does NoOp mixer behave as expected . ( not update offsets nor touch buffers )
TEST(PassThru, NoOp) {
  auto no_op_mixer = std::make_unique<mixer::NoOp>();
  EXPECT_NE(nullptr, no_op_mixer);
  int16_t source[] = {0x7FFF, -0x8000};
  float accum[] = {-1, 42};
  float expect[] = {-1, 42};
  uint32_t dest_offset = 0;
  int32_t frac_src_offset = 0;
  bool mix_result =
      no_op_mixer->Mix(accum, std::size(accum), &dest_offset, source,
                       std::size(source) << kPtsFractionalBits, &frac_src_offset, false);
  EXPECT_FALSE(mix_result);
  EXPECT_EQ(dest_offset, 0u);
  EXPECT_EQ(frac_src_offset, 0);
  EXPECT_THAT(accum, Pointwise(FloatEq(), expect));
}
TEST ( PassThru , NoOp ) { auto no_op_mixer = std :: make_unique < mixer :: NoOp > ( ) ; EXPECT_NE ( nullptr , no_op_mixer ) ; int16_t source [ ] = { 0x7FFF , -0x8000 } ; float accum [ ] = { -1 , 42 } ; float expect [ ] = { -1 , 42 } ; uint32_t dest_offset = 0 ; int32_t frac_src_offset = 0 ; bool mix_result = no_op_mixer -> Mix ( accum , std :: size ( accum ) , & dest_offset , source , std :: size ( source ) << kPtsFractionalBits , & frac_src_offset , false ) ; EXPECT_FALSE ( mix_result ) ; EXPECT_EQ ( dest_offset , 0u ) ; EXPECT_EQ ( frac_src_offset , 0 ) ; EXPECT_THAT ( accum , Pointwise ( FloatEq ( ) , expect ) ) ; }
Does NoOp mixer behave as expected?
Does NoOp mixer behave as expected?