Delete voice_detection() pointer to submodule
The new configuration path is via AudioProcessing::ApplyConfig and
AudioProcessing::GetStatistics.
ApmTest.Process passes with unchanged reference files if
audio_processing_impl would initialize the VAD with
VoiceDetection::kLowLikelihood instead of kVeryLowLikelihood.
This was verified by testing this CL with that modification.
Bug: webrtc:9878
Change-Id: I4d08df37a07e5c72feeec02a07d6b9435f917d72
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155445
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29395}
diff --git a/modules/audio_processing/include/mock_audio_processing.h b/modules/audio_processing/include/mock_audio_processing.h
index 1c08726..e989fea 100644
--- a/modules/audio_processing/include/mock_audio_processing.h
+++ b/modules/audio_processing/include/mock_audio_processing.h
@@ -91,26 +91,12 @@
MOCK_METHOD1(SetAudioBufferDelay, void(size_t delay_ms));
};
-class MockVoiceDetection : public VoiceDetection {
- public:
- virtual ~MockVoiceDetection() {}
- MOCK_METHOD1(Enable, int(bool enable));
- MOCK_CONST_METHOD0(is_enabled, bool());
- MOCK_CONST_METHOD0(stream_has_voice, bool());
- MOCK_METHOD1(set_stream_has_voice, int(bool has_voice));
- MOCK_METHOD1(set_likelihood, int(Likelihood likelihood));
- MOCK_CONST_METHOD0(likelihood, Likelihood());
- MOCK_METHOD1(set_frame_size_ms, int(int size));
- MOCK_CONST_METHOD0(frame_size_ms, int());
-};
-
class MockAudioProcessing : public ::testing::NiceMock<AudioProcessing> {
public:
MockAudioProcessing()
: gain_control_(new ::testing::NiceMock<MockGainControl>()),
level_estimator_(new ::testing::NiceMock<MockLevelEstimator>()),
- noise_suppression_(new ::testing::NiceMock<MockNoiseSuppression>()),
- voice_detection_(new ::testing::NiceMock<MockVoiceDetection>()) {}
+ noise_suppression_(new ::testing::NiceMock<MockNoiseSuppression>()) {}
virtual ~MockAudioProcessing() {}
@@ -183,9 +169,6 @@
virtual MockNoiseSuppression* noise_suppression() const {
return noise_suppression_.get();
}
- virtual MockVoiceDetection* voice_detection() const {
- return voice_detection_.get();
- }
MOCK_CONST_METHOD0(GetConfig, AudioProcessing::Config());
@@ -193,7 +176,6 @@
std::unique_ptr<MockGainControl> gain_control_;
std::unique_ptr<MockLevelEstimator> level_estimator_;
std::unique_ptr<MockNoiseSuppression> noise_suppression_;
- std::unique_ptr<MockVoiceDetection> voice_detection_;
};
} // namespace test