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

Unified Diff: talk/media/webrtc/webrtcvoiceengine_unittest.cc

Issue 1397773002: Change SetOutputScaling to set a single level, not left/right levels. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase+rename Created 5 years, 2 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 | « talk/media/webrtc/webrtcvoiceengine.cc ('k') | talk/session/media/channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/webrtc/webrtcvoiceengine_unittest.cc
diff --git a/talk/media/webrtc/webrtcvoiceengine_unittest.cc b/talk/media/webrtc/webrtcvoiceengine_unittest.cc
index 70318d14f72c5cbaada7e39359a9eb5f6e3fe969..6f7166afae72f57046f3f4e638911f1048705593 100644
--- a/talk/media/webrtc/webrtcvoiceengine_unittest.cc
+++ b/talk/media/webrtc/webrtcvoiceengine_unittest.cc
@@ -2897,27 +2897,23 @@ TEST_F(WebRtcVoiceEngineTestFake, TestGetChannelNumInConferenceCalls) {
media_channel->GetReceiveChannelId(kSsrc2));
}
-TEST_F(WebRtcVoiceEngineTestFake, SetOutputScaling) {
+TEST_F(WebRtcVoiceEngineTestFake, SetOutputVolume) {
EXPECT_TRUE(SetupEngine());
- float scale, left, right;
- EXPECT_TRUE(channel_->SetOutputScaling(0, 1, 2));
+ float scale;
+ EXPECT_TRUE(channel_->SetOutputVolume(0, 2));
int channel_id = voe_.GetLastChannel();
EXPECT_EQ(0, voe_.GetChannelOutputVolumeScaling(channel_id, scale));
- EXPECT_EQ(0, voe_.GetOutputVolumePan(channel_id, left, right));
- EXPECT_DOUBLE_EQ(1, left * scale);
- EXPECT_DOUBLE_EQ(2, right * scale);
+ EXPECT_DOUBLE_EQ(2, scale);
- EXPECT_FALSE(channel_->SetOutputScaling(kSsrc2, 1, 2));
+ EXPECT_FALSE(channel_->SetOutputVolume(kSsrc2, 0.5));
cricket::StreamParams stream;
stream.ssrcs.push_back(kSsrc2);
EXPECT_TRUE(channel_->AddRecvStream(stream));
- EXPECT_TRUE(channel_->SetOutputScaling(kSsrc2, 2, 1));
+ EXPECT_TRUE(channel_->SetOutputVolume(kSsrc2, 3));
channel_id = voe_.GetLastChannel();
EXPECT_EQ(0, voe_.GetChannelOutputVolumeScaling(channel_id, scale));
- EXPECT_EQ(0, voe_.GetOutputVolumePan(channel_id, left, right));
- EXPECT_DOUBLE_EQ(2, left * scale);
- EXPECT_DOUBLE_EQ(1, right * scale);
+ EXPECT_DOUBLE_EQ(3, scale);
}
TEST_F(WebRtcVoiceEngineTestFake, SetsSyncGroupFromSyncLabel) {
« no previous file with comments | « talk/media/webrtc/webrtcvoiceengine.cc ('k') | talk/session/media/channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698