Convert channel counts to size_t.

IIRC, this was originally requested by ajm during review of the other size_t conversions I did over the past year, and I agreed it made sense, but wanted to do it separately since those changes were already gargantuan.

BUG=chromium:81439
TEST=none
R=henrik.lundin@webrtc.org, henrika@webrtc.org, kjellander@webrtc.org, minyue@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org

Review URL: https://codereview.webrtc.org/1316523002 .

Cr-Commit-Position: refs/heads/master@{#11229}
This commit is contained in:
Peter Kasting
2016-01-12 16:26:35 -08:00
parent 92e677a1f8
commit 6955870806
190 changed files with 892 additions and 868 deletions

View File

@ -11,6 +11,7 @@
#include "webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/base/format_macros.h"
#include "webrtc/test/testsupport/fileutils.h"
using ::std::tr1::get;
@ -99,7 +100,7 @@ void AudioCodecSpeedTest::EncodeDecode(size_t audio_duration_sec) {
size_t time_now_ms = 0;
float time_ms;
printf("Coding %d kHz-sampled %d-channel audio at %d bps ...\n",
printf("Coding %d kHz-sampled %" PRIuS "-channel audio at %d bps ...\n",
input_sampling_khz_, channels_, bit_rate_);
while (time_now_ms < audio_duration_sec * 1000) {

View File

@ -20,7 +20,8 @@ namespace webrtc {
// Define coding parameter as
// <channels, bit_rate, file_name, extension, if_save_output>.
typedef std::tr1::tuple<int, int, std::string, std::string, bool> coding_param;
typedef std::tr1::tuple<size_t, int, std::string, std::string, bool>
coding_param;
class AudioCodecSpeedTest : public testing::TestWithParam<coding_param> {
protected:
@ -74,7 +75,7 @@ class AudioCodecSpeedTest : public testing::TestWithParam<coding_param> {
float decoding_time_ms_;
FILE* out_file_;
int channels_;
size_t channels_;
// Bit rate is in bit-per-second.
int bit_rate_;