NetEq: Add new method last_output_sample_rate_hz
This change moves the logics for keeping track of the last ouput sample rate from AcmReceiver to NetEq, where it fits better. The getter function AcmReceiver::current_sample_rate_hz() is renamed to last_output_sample_rate_hz(). BUG=webrtc:3520 Review URL: https://codereview.webrtc.org/1467163002 Cr-Commit-Position: refs/heads/master@{#10754}
This commit is contained in:
committed by
Commit bot
parent
dfafd12418
commit
d89814bfd7
@ -362,6 +362,7 @@ void NetEqDecodingTest::Process(size_t* out_len) {
|
||||
(*out_len == kBlockSize16kHz) ||
|
||||
(*out_len == kBlockSize32kHz));
|
||||
output_sample_rate_ = static_cast<int>(*out_len / 10 * 1000);
|
||||
EXPECT_EQ(output_sample_rate_, neteq_->last_output_sample_rate_hz());
|
||||
|
||||
// Increase time.
|
||||
sim_clock_ += kTimeStepMs;
|
||||
@ -895,6 +896,8 @@ TEST_F(NetEqDecodingTest, GetAudioBeforeInsertPacket) {
|
||||
SCOPED_TRACE(ss.str()); // Print out the parameter values on failure.
|
||||
EXPECT_EQ(0, out_data_[i]);
|
||||
}
|
||||
// Verify that the sample rate did not change from the initial configuration.
|
||||
EXPECT_EQ(config_.sample_rate_hz, neteq_->last_output_sample_rate_hz());
|
||||
}
|
||||
|
||||
class NetEqBgnTest : public NetEqDecodingTest {
|
||||
|
||||
Reference in New Issue
Block a user