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

Side by Side Diff: webrtc/voice_engine/test/auto_test/standard/external_media_test.cc

Issue 2006243002: Revert of Adding a some checks and switching out a few assert for RTC_[D]CHECK. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « webrtc/voice_engine/channel.cc ('k') | webrtc/voice_engine/utility.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 int f = kValidFrequencies[i]; 100 int f = kValidFrequencies[i];
101 EXPECT_EQ(0, voe_xmedia_->GetAudioFrame(channel_, f, &frame)) 101 EXPECT_EQ(0, voe_xmedia_->GetAudioFrame(channel_, f, &frame))
102 << "Resampling succeeds for freq=" << f; 102 << "Resampling succeeds for freq=" << f;
103 EXPECT_EQ(f, frame.sample_rate_hz_); 103 EXPECT_EQ(f, frame.sample_rate_hz_);
104 EXPECT_EQ(static_cast<size_t>(f / 100), frame.samples_per_channel_); 104 EXPECT_EQ(static_cast<size_t>(f / 100), frame.samples_per_channel_);
105 } 105 }
106 PausePlaying(); 106 PausePlaying();
107 EXPECT_EQ(0, voe_xmedia_->SetExternalMixing(channel_, false)); 107 EXPECT_EQ(0, voe_xmedia_->SetExternalMixing(channel_, false));
108 ResumePlaying(); 108 ResumePlaying();
109 } 109 }
110
111 TEST_F(ExternalMediaTest,
112 ExternalMixingResamplingToInvalidFrequenciesFails) {
113 const int kInvalidFrequencies[] = {-8000, -1};
114 webrtc::AudioFrame frame;
115 PausePlaying();
116 EXPECT_EQ(0, voe_xmedia_->SetExternalMixing(channel_, true));
117 ResumePlaying();
118 for (size_t i = 0; i < arraysize(kInvalidFrequencies); i++) {
119 int f = kInvalidFrequencies[i];
120 EXPECT_EQ(-1, voe_xmedia_->GetAudioFrame(channel_, f, &frame))
121 << "Resampling fails for freq=" << f;
122 }
123 PausePlaying();
124 EXPECT_EQ(0, voe_xmedia_->SetExternalMixing(channel_, false));
125 ResumePlaying();
126 }
OLDNEW
« no previous file with comments | « webrtc/voice_engine/channel.cc ('k') | webrtc/voice_engine/utility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698