Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Unified Diff: webrtc/audio/audio_send_stream_unittest.cc

Issue 2721003002: Remove usage of VoEVolumeControl from WVoE and Audio[Send|Receive]Stream. (Closed)
Patch Set: rebase+comment Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/audio/audio_send_stream.cc ('k') | webrtc/call/audio_receive_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/audio/audio_send_stream_unittest.cc
diff --git a/webrtc/audio/audio_send_stream_unittest.cc b/webrtc/audio/audio_send_stream_unittest.cc
index 8e8b0e965ec37a3b7c15212c5b7a7186792ae3be..b1a2401c6bbac77f21e6915a62c79b118f675b2b 100644
--- a/webrtc/audio/audio_send_stream_unittest.cc
+++ b/webrtc/audio/audio_send_stream_unittest.cc
@@ -26,6 +26,7 @@
#include "webrtc/test/gtest.h"
#include "webrtc/test/mock_voe_channel_proxy.h"
#include "webrtc/test/mock_voice_engine.h"
+#include "webrtc/voice_engine/transmit_mixer.h"
namespace webrtc {
namespace test {
@@ -46,7 +47,7 @@ const int kEchoDelayStdDev = -3;
const int kEchoReturnLoss = -65;
const int kEchoReturnLossEnhancement = 101;
const float kResidualEchoLikelihood = -1.0f;
-const unsigned int kSpeechInputLevel = 96;
+const int32_t kSpeechInputLevel = 96;
const CallStatistics kCallStats = {
1345, 1678, 1901, 1234, 112, 13456, 17890, 1567, -1890, -1123};
const ReportBlock kReportBlock = {456, 780, 123, 567, 890, 132, 143, 13354};
@@ -63,6 +64,11 @@ class MockLimitObserver : public BitrateAllocator::LimitObserver {
uint32_t max_padding_bitrate_bps));
};
+class MockTransmitMixer : public voe::TransmitMixer {
+ public:
+ MOCK_CONST_METHOD0(AudioLevelFullRange, int16_t());
+};
+
struct ConfigHelper {
explicit ConfigHelper(bool audio_bwe_enabled)
: simulated_clock_(123456),
@@ -213,11 +219,14 @@ struct ConfigHelper {
.WillRepeatedly(Return(report_blocks));
EXPECT_CALL(*channel_proxy_, GetSendCodec(_))
.WillRepeatedly(DoAll(SetArgPointee<0>(kIsacCodec), Return(true)));
- EXPECT_CALL(voice_engine_, GetSpeechInputLevelFullRange(_))
- .WillRepeatedly(DoAll(SetArgReferee<0>(kSpeechInputLevel), Return(0)));
+ EXPECT_CALL(voice_engine_, transmit_mixer())
+ .WillRepeatedly(Return(&transmit_mixer_));
EXPECT_CALL(voice_engine_, audio_processing())
.WillRepeatedly(Return(&audio_processing_));
+ EXPECT_CALL(transmit_mixer_, AudioLevelFullRange())
+ .WillRepeatedly(Return(kSpeechInputLevel));
+
// We have to set the instantaneous value, the average, min and max. We only
// care about the instantaneous value, so we set all to the same value.
audio_processing_stats_.echo_return_loss.Set(
@@ -241,6 +250,7 @@ struct ConfigHelper {
testing::NiceMock<MockCongestionObserver> bitrate_observer_;
testing::NiceMock<MockRemoteBitrateObserver> remote_bitrate_observer_;
MockAudioProcessing audio_processing_;
+ MockTransmitMixer transmit_mixer_;
AudioProcessing::AudioProcessingStatistics audio_processing_stats_;
PacketRouter packet_router_;
CongestionController congestion_controller_;
« no previous file with comments | « webrtc/audio/audio_send_stream.cc ('k') | webrtc/call/audio_receive_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698