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

Unified Diff: webrtc/modules/utility/source/file_recorder_impl.cc

Issue 1230503003: Update a ton of audio code to use size_t more correctly and in general reduce (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 4 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/modules/utility/source/file_recorder_impl.cc
diff --git a/webrtc/modules/utility/source/file_recorder_impl.cc b/webrtc/modules/utility/source/file_recorder_impl.cc
index e86afc69722ab7f06d45e4c90e9e231cebd89348..6a5f2c27c25113bad14135e9af4b523b98c6cdb8 100644
--- a/webrtc/modules/utility/source/file_recorder_impl.cc
+++ b/webrtc/modules/utility/source/file_recorder_impl.cc
@@ -156,7 +156,7 @@ int32_t FileRecorderImpl::RecordAudioToFile(
tempAudioFrame.sample_rate_hz_ = incomingAudioFrame.sample_rate_hz_;
tempAudioFrame.samples_per_channel_ =
incomingAudioFrame.samples_per_channel_;
- for (uint16_t i = 0;
+ for (size_t i = 0;
i < (incomingAudioFrame.samples_per_channel_); i++)
{
// Sample value is the average of left and right buffer rounded to
@@ -174,7 +174,7 @@ int32_t FileRecorderImpl::RecordAudioToFile(
tempAudioFrame.sample_rate_hz_ = incomingAudioFrame.sample_rate_hz_;
tempAudioFrame.samples_per_channel_ =
incomingAudioFrame.samples_per_channel_;
- for (uint16_t i = 0;
+ for (size_t i = 0;
i < (incomingAudioFrame.samples_per_channel_); i++)
{
// Duplicate sample to both channels
@@ -210,7 +210,7 @@ int32_t FileRecorderImpl::RecordAudioToFile(
return -1;
}
} else {
- int outLen = 0;
+ size_t outLen = 0;
_audioResampler.ResetIfNeeded(ptrAudioFrame->sample_rate_hz_,
codec_info_.plfreq,
ptrAudioFrame->num_channels_);
« no previous file with comments | « webrtc/modules/utility/source/file_player_unittests.cc ('k') | webrtc/system_wrappers/interface/aligned_array.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698