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

Unified Diff: webrtc/audio/audio_receive_stream_unittest.cc

Issue 2062193002: Add AudioReceiveStream::SetGain() method and use that in WVoMC::SetOutputVolume(). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: misc Created 4 years, 6 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
Index: webrtc/audio/audio_receive_stream_unittest.cc
diff --git a/webrtc/audio/audio_receive_stream_unittest.cc b/webrtc/audio/audio_receive_stream_unittest.cc
index 9d6aa9bdb4c4f02552e0a0fc28a6338ee92f89cc..ca7dc702fd47782a550f78929d6cbd0ba97c0fb3 100644
--- a/webrtc/audio/audio_receive_stream_unittest.cc
+++ b/webrtc/audio/audio_receive_stream_unittest.cc
@@ -30,6 +30,7 @@ namespace test {
namespace {
using testing::_;
+using testing::FloatEq;
using testing::Return;
using testing::ReturnRef;
@@ -91,12 +92,12 @@ struct ConfigHelper {
EXPECT_CALL(*channel_proxy_,
SetReceiveAudioLevelIndicationStatus(true, kAudioLevelId))
.Times(1);
- EXPECT_CALL(*channel_proxy_, EnableReceiveTransportSequenceNumber(
- kTransportSequenceNumberId))
- .Times(1);
EXPECT_CALL(*channel_proxy_,
- RegisterReceiverCongestionControlObjects(&packet_router_))
- .Times(1);
+ EnableReceiveTransportSequenceNumber(kTransportSequenceNumberId))
+ .Times(1);
+ EXPECT_CALL(*channel_proxy_,
+ RegisterReceiverCongestionControlObjects(&packet_router_))
+ .Times(1);
kwiberg-webrtc 2016/06/16 09:26:53 Ummm... am I missing something, or is this hunk ju
the sun 2016/06/16 14:34:06 Yes, sorry about that.
EXPECT_CALL(congestion_controller_, packet_router())
.WillOnce(Return(&packet_router_));
EXPECT_CALL(*channel_proxy_, ResetCongestionControlObjects())
@@ -301,7 +302,6 @@ TEST(AudioReceiveStreamTest, ReceiveRtcpPacket) {
EXPECT_TRUE(recv_stream.DeliverRtcp(&rtcp_packet[0], rtcp_packet.size()));
}
-
TEST(AudioReceiveStreamTest, GetStats) {
ConfigHelper helper;
internal::AudioReceiveStream recv_stream(
@@ -343,5 +343,14 @@ TEST(AudioReceiveStreamTest, GetStats) {
EXPECT_EQ(kCallStats.capture_start_ntp_time_ms_,
stats.capture_start_ntp_time_ms);
}
+
+TEST(AudioReceiveStreamTest, SetGain) {
+ ConfigHelper helper;
+ internal::AudioReceiveStream recv_stream(
+ helper.congestion_controller(), helper.config(), helper.audio_state());
+ EXPECT_CALL(*helper.channel_proxy(),
+ SetChannelOutputVolumeScaling(FloatEq(0.765f)));
+ recv_stream.SetGain(0.765f);
+}
} // namespace test
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698