diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc index 3c67a9bf28..e849822720 100644 --- a/webrtc/modules/audio_processing/audio_processing_impl.cc +++ b/webrtc/modules/audio_processing/audio_processing_impl.cc @@ -875,11 +875,6 @@ int AudioProcessingImpl::AnalyzeReverseStream(AudioFrame* frame) { frame->sample_rate_hz_ != kSampleRate48kHz) { return kBadSampleRateError; } - // This interface does not tolerate different forward and reverse rates. - if (frame->sample_rate_hz_ != - formats_.api_format.input_stream().sample_rate_hz()) { - return kBadSampleRateError; - } if (frame->num_channels_ <= 0) { return kBadNumberChannelsError; diff --git a/webrtc/modules/audio_processing/audio_processing_impl_unittest.cc b/webrtc/modules/audio_processing/audio_processing_impl_unittest.cc index ed20daaa61..965e7eb60b 100644 --- a/webrtc/modules/audio_processing/audio_processing_impl_unittest.cc +++ b/webrtc/modules/audio_processing/audio_processing_impl_unittest.cc @@ -65,12 +65,10 @@ TEST(AudioProcessingImplTest, AudioParameterChangeTriggersInit) { frame.num_channels_ = 2; EXPECT_NOERR(mock.AnalyzeReverseStream(&frame)); - // A new sample rate passed to AnalyzeReverseStream should be an error and - // not cause an init. + // A new sample rate passed to AnalyzeReverseStream should cause an init. SetFrameSampleRate(&frame, 16000); - EXPECT_CALL(mock, InitializeLocked()) - .Times(0); - EXPECT_EQ(mock.kBadSampleRateError, mock.AnalyzeReverseStream(&frame)); + EXPECT_CALL(mock, InitializeLocked()).Times(1); + EXPECT_NOERR(mock.AnalyzeReverseStream(&frame)); } } // namespace webrtc