src/media/audio/audio_core/mixer/bookkeeping_unittest.cc
// Upon Reset, Bookkeeping should clear position modulo and gain ramp. It should also clear its
// historical dest and source frame counters.
Upon Reset, Bookkeeping should clear position modulo and gain ramp. It should also clear its
historical dest and source frame counters.
Upon Reset Bookkeeping should clear position modulo and gain ramp . It should also clear its historical dest and source frame counters .
TEST(BookkeepingTest, Reset) {
  StubMixer mixer;
  auto& bookkeeping = mixer.bookkeeping();
  bookkeeping.rate_modulo = 5;
  bookkeeping.denominator = 7;
  bookkeeping.src_pos_modulo = 3;
  bookkeeping.gain.SetSourceGainWithRamp(-42.0f, zx::sec(1),
                                         fuchsia::media::audio::RampType::SCALE_LINEAR);
  EXPECT_TRUE(bookkeeping.gain.IsRamping());
  bookkeeping.Reset();
  EXPECT_EQ(bookkeeping.rate_modulo, 5ull);
  EXPECT_EQ(bookkeeping.denominator, 7ull);
  EXPECT_EQ(bookkeeping.src_pos_modulo, 0ull);
  EXPECT_FALSE(bookkeeping.gain.IsRamping());
}
TEST ( BookkeepingTest , Reset ) { StubMixer mixer ; auto & bookkeeping = mixer . bookkeeping ( ) ; bookkeeping . rate_modulo = 5 ; bookkeeping . denominator = 7 ; bookkeeping . src_pos_modulo = 3 ; bookkeeping . gain . SetSourceGainWithRamp ( -42.0f , zx :: sec ( 1 ) , fuchsia :: media :: audio :: RampType :: SCALE_LINEAR ) ; EXPECT_TRUE ( bookkeeping . gain . IsRamping ( ) ) ; bookkeeping . Reset ( ) ; EXPECT_EQ ( bookkeeping . rate_modulo , 5ull ) ; EXPECT_EQ ( bookkeeping . denominator , 7ull ) ; EXPECT_EQ ( bookkeeping . src_pos_modulo , 0ull ) ; EXPECT_FALSE ( bookkeeping . gain . IsRamping ( ) ) ; }
Upon Reset, Bookkeeping should clear position modulo and gain ramp.
Upon Reset Bookkeeping should clear position modulo and gain ramp .