Index: webrtc/modules/audio_processing/test/unpack.cc |
diff --git a/webrtc/modules/audio_processing/test/unpack.cc b/webrtc/modules/audio_processing/test/unpack.cc |
index 2484828bd18662ea1bb5ae15306dd0adcd28719f..872dafa7c2269645de327587c32da95430dc87d1 100644 |
--- a/webrtc/modules/audio_processing/test/unpack.cc |
+++ b/webrtc/modules/audio_processing/test/unpack.cc |
@@ -17,6 +17,7 @@ |
#include "gflags/gflags.h" |
#include "webrtc/audio_processing/debug.pb.h" |
+#include "webrtc/base/format_macros.h" |
#include "webrtc/base/scoped_ptr.h" |
#include "webrtc/modules/audio_processing/test/protobuf_utils.h" |
#include "webrtc/modules/audio_processing/test/test_utils.h" |
@@ -71,12 +72,12 @@ int do_main(int argc, char* argv[]) { |
Event event_msg; |
int frame_count = 0; |
- int reverse_samples_per_channel = 0; |
- int input_samples_per_channel = 0; |
- int output_samples_per_channel = 0; |
- int num_reverse_channels = 0; |
- int num_input_channels = 0; |
- int num_output_channels = 0; |
+ size_t reverse_samples_per_channel = 0; |
+ size_t input_samples_per_channel = 0; |
+ size_t output_samples_per_channel = 0; |
+ size_t num_reverse_channels = 0; |
+ size_t num_input_channels = 0; |
+ size_t num_output_channels = 0; |
rtc::scoped_ptr<WavWriter> reverse_wav_file; |
rtc::scoped_ptr<WavWriter> input_wav_file; |
rtc::scoped_ptr<WavWriter> output_wav_file; |
@@ -109,7 +110,7 @@ int do_main(int argc, char* argv[]) { |
} |
rtc::scoped_ptr<const float* []> data( |
new const float* [num_reverse_channels]); |
- for (int i = 0; i < num_reverse_channels; ++i) { |
+ for (size_t i = 0; i < num_reverse_channels; ++i) { |
data[i] = reinterpret_cast<const float*>(msg.channel(i).data()); |
} |
WriteFloatData(data.get(), |
@@ -140,7 +141,7 @@ int do_main(int argc, char* argv[]) { |
} |
rtc::scoped_ptr<const float* []> data( |
new const float* [num_input_channels]); |
- for (int i = 0; i < num_input_channels; ++i) { |
+ for (size_t i = 0; i < num_input_channels; ++i) { |
data[i] = reinterpret_cast<const float*>(msg.input_channel(i).data()); |
} |
WriteFloatData(data.get(), |
@@ -164,7 +165,7 @@ int do_main(int argc, char* argv[]) { |
} |
rtc::scoped_ptr<const float* []> data( |
new const float* [num_output_channels]); |
- for (int i = 0; i < num_output_channels; ++i) { |
+ for (size_t i = 0; i < num_output_channels; ++i) { |
data[i] = |
reinterpret_cast<const float*>(msg.output_channel(i).data()); |
} |
@@ -236,11 +237,14 @@ int do_main(int argc, char* argv[]) { |
" Reverse sample rate: %d\n", |
reverse_sample_rate); |
num_input_channels = msg.num_input_channels(); |
- fprintf(settings_file, " Input channels: %d\n", num_input_channels); |
+ fprintf(settings_file, " Input channels: %" PRIuS "\n", |
+ num_input_channels); |
num_output_channels = msg.num_output_channels(); |
- fprintf(settings_file, " Output channels: %d\n", num_output_channels); |
+ fprintf(settings_file, " Output channels: %" PRIuS "\n", |
+ num_output_channels); |
num_reverse_channels = msg.num_reverse_channels(); |
- fprintf(settings_file, " Reverse channels: %d\n", num_reverse_channels); |
+ fprintf(settings_file, " Reverse channels: %" PRIuS "\n", |
+ num_reverse_channels); |
fprintf(settings_file, "\n"); |
@@ -251,9 +255,12 @@ int do_main(int argc, char* argv[]) { |
output_sample_rate = input_sample_rate; |
} |
- reverse_samples_per_channel = reverse_sample_rate / 100; |
- input_samples_per_channel = input_sample_rate / 100; |
- output_samples_per_channel = output_sample_rate / 100; |
+ reverse_samples_per_channel = |
+ static_cast<size_t>(reverse_sample_rate / 100); |
+ input_samples_per_channel = |
+ static_cast<size_t>(input_sample_rate / 100); |
+ output_samples_per_channel = |
+ static_cast<size_t>(output_sample_rate / 100); |
if (!FLAGS_raw) { |
// The WAV files need to be reset every time, because they cant change |