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

Unified Diff: webrtc/voice_engine/utility_unittest.cc

Issue 1168753002: Match existing type usage better. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 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
« no previous file with comments | « webrtc/voice_engine/channel.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/utility_unittest.cc
diff --git a/webrtc/voice_engine/utility_unittest.cc b/webrtc/voice_engine/utility_unittest.cc
index 8f7efa87f65e765c782bf4e953837e82606fef5d..a5dd70b97e1045323ae74935b53f37bdbcbff3ca 100644
--- a/webrtc/voice_engine/utility_unittest.cc
+++ b/webrtc/voice_engine/utility_unittest.cc
@@ -54,7 +54,7 @@ void SetMonoFrame(AudioFrame* frame, float data, int sample_rate_hz) {
frame->sample_rate_hz_ = sample_rate_hz;
frame->samples_per_channel_ = sample_rate_hz / 100;
for (int i = 0; i < frame->samples_per_channel_; i++) {
- frame->data_[i] = data * i;
+ frame->data_[i] = static_cast<int16_t>(data * i);
}
}
@@ -72,8 +72,8 @@ void SetStereoFrame(AudioFrame* frame, float left, float right,
frame->sample_rate_hz_ = sample_rate_hz;
frame->samples_per_channel_ = sample_rate_hz / 100;
for (int i = 0; i < frame->samples_per_channel_; i++) {
- frame->data_[i * 2] = left * i;
- frame->data_[i * 2 + 1] = right * i;
+ frame->data_[i * 2] = static_cast<int16_t>(left * i);
+ frame->data_[i * 2 + 1] = static_cast<int16_t>(right * i);
}
}
« no previous file with comments | « webrtc/voice_engine/channel.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698