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-Original-Commit-Position: refs/heads/master@{#11229}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 6955870806624479723addfae6dcf5d13968796c
diff --git a/modules/audio_coding/acm2/rent_a_codec.cc b/modules/audio_coding/acm2/rent_a_codec.cc
index 14302e4..5695fd6 100644
--- a/modules/audio_coding/acm2/rent_a_codec.cc
+++ b/modules/audio_coding/acm2/rent_a_codec.cc
@@ -45,7 +45,7 @@
rtc::Optional<RentACodec::CodecId> RentACodec::CodecIdByParams(
const char* payload_name,
int sampling_freq_hz,
- int channels) {
+ size_t channels) {
return CodecIdFromIndex(
ACMCodecDB::CodecId(payload_name, sampling_freq_hz, channels));
}
@@ -63,7 +63,7 @@
rtc::Optional<CodecInst> RentACodec::CodecInstByParams(const char* payload_name,
int sampling_freq_hz,
- int channels) {
+ size_t channels) {
rtc::Optional<CodecId> codec_id =
CodecIdByParams(payload_name, sampling_freq_hz, channels);
if (!codec_id)
@@ -83,7 +83,7 @@
}
rtc::Optional<bool> RentACodec::IsSupportedNumChannels(CodecId codec_id,
- int num_channels) {
+ size_t num_channels) {
auto i = CodecIndexFromId(codec_id);
return i ? rtc::Optional<bool>(
ACMCodecDB::codec_settings_[*i].channel_support >=
@@ -98,7 +98,7 @@
rtc::Optional<NetEqDecoder> RentACodec::NetEqDecoderFromCodecId(
CodecId codec_id,
- int num_channels) {
+ size_t num_channels) {
rtc::Optional<int> i = CodecIndexFromId(codec_id);
if (!i)
return rtc::Optional<NetEqDecoder>();