barelymusician/dsp/sample_player_test.cpp
// Tests that the sample player resets its state correctly.
Tests that the sample player resets its state correctly.
Tests that the sample player resets its state correctly .
TEST(SamplePlayerTest, Reset) {
  SamplePlayer sample_player(kSampleRate);
  sample_player.SetData(kData, kSampleRate, kDataLength);
  const double first_sample = sample_player.Next();
  EXPECT_NE(sample_player.Next(), first_sample);
  sample_player.Reset();
  EXPECT_DOUBLE_EQ(sample_player.Next(), first_sample);
}
TEST ( SamplePlayerTest , Reset ) { SamplePlayer sample_player ( kSampleRate ) ; sample_player . SetData ( kData , kSampleRate , kDataLength ) ; const double first_sample = sample_player . Next ( ) ; EXPECT_NE ( sample_player . Next ( ) , first_sample ) ; sample_player . Reset ( ) ; EXPECT_DOUBLE_EQ ( sample_player . Next ( ) , first_sample ) ; }
Tests that the sample player resets its state correctly.
Tests that the sample player resets its state correctly .