| Index: webrtc/modules/interface/module_common_types.h
|
| diff --git a/webrtc/modules/interface/module_common_types.h b/webrtc/modules/interface/module_common_types.h
|
| index 5e766978d502a88259efb747f1f0fc5d45ea76cb..bff2ccd8675f222abfc6739989ee463d36c80ad1 100644
|
| --- a/webrtc/modules/interface/module_common_types.h
|
| +++ b/webrtc/modules/interface/module_common_types.h
|
| @@ -28,7 +28,7 @@ struct RTPAudioHeader {
|
| uint8_t numEnergy; // number of valid entries in arrOfEnergy
|
| uint8_t arrOfEnergy[kRtpCsrcSize]; // one energy byte (0-9) per channel
|
| bool isCNG; // is this CNG
|
| - uint8_t channel; // number of channels 2 = stereo
|
| + size_t channel; // number of channels 2 = stereo
|
| };
|
|
|
| const int16_t kNoPictureId = -1;
|
| @@ -451,7 +451,7 @@ class AudioFrame {
|
| void UpdateFrame(int id, uint32_t timestamp, const int16_t* data,
|
| size_t samples_per_channel, int sample_rate_hz,
|
| SpeechType speech_type, VADActivity vad_activity,
|
| - int num_channels = 1, uint32_t energy = -1);
|
| + size_t num_channels = 1, uint32_t energy = -1);
|
|
|
| AudioFrame& Append(const AudioFrame& rhs);
|
|
|
| @@ -475,7 +475,7 @@ class AudioFrame {
|
| int16_t data_[kMaxDataSizeSamples];
|
| size_t samples_per_channel_;
|
| int sample_rate_hz_;
|
| - int num_channels_;
|
| + size_t num_channels_;
|
| SpeechType speech_type_;
|
| VADActivity vad_activity_;
|
| // Note that there is no guarantee that |energy_| is correct. Any user of this
|
| @@ -517,7 +517,7 @@ inline void AudioFrame::UpdateFrame(int id,
|
| int sample_rate_hz,
|
| SpeechType speech_type,
|
| VADActivity vad_activity,
|
| - int num_channels,
|
| + size_t num_channels,
|
| uint32_t energy) {
|
| id_ = id;
|
| timestamp_ = timestamp;
|
| @@ -528,7 +528,6 @@ inline void AudioFrame::UpdateFrame(int id,
|
| num_channels_ = num_channels;
|
| energy_ = energy;
|
|
|
| - assert(num_channels >= 0);
|
| const size_t length = samples_per_channel * num_channels;
|
| assert(length <= kMaxDataSizeSamples);
|
| if (data != NULL) {
|
| @@ -553,7 +552,6 @@ inline void AudioFrame::CopyFrom(const AudioFrame& src) {
|
| energy_ = src.energy_;
|
| interleaved_ = src.interleaved_;
|
|
|
| - assert(num_channels_ >= 0);
|
| const size_t length = samples_per_channel_ * num_channels_;
|
| assert(length <= kMaxDataSizeSamples);
|
| memcpy(data_, src.data_, sizeof(int16_t) * length);
|
|
|