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

Unified Diff: webrtc/voice_engine/voe_base_impl.cc

Issue 1238083005: [NOT FOR REVIEW] Convert channel counts to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@size_t
Patch Set: Checkpoint Created 5 years, 5 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
« no previous file with comments | « webrtc/voice_engine/voe_base_impl.h ('k') | webrtc/voice_engine/voe_codec_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/voe_base_impl.cc
diff --git a/webrtc/voice_engine/voe_base_impl.cc b/webrtc/voice_engine/voe_base_impl.cc
index 1dc89e7ee119422fd14c9eb56e36de31b914a51f..7800e3a905d7edd8ece48b20fa69c82d6bfe36ea 100644
--- a/webrtc/voice_engine/voe_base_impl.cc
+++ b/webrtc/voice_engine/voe_base_impl.cc
@@ -81,7 +81,7 @@ void VoEBaseImpl::OnWarningIsReported(WarningCode warning) {
int32_t VoEBaseImpl::RecordedDataIsAvailable(
const void* audioSamples, size_t nSamples, size_t nBytesPerSample,
- uint8_t nChannels, uint32_t samplesPerSec, uint32_t totalDelayMS,
+ size_t nChannels, uint32_t samplesPerSec, uint32_t totalDelayMS,
int32_t clockDrift, uint32_t micLevel, bool keyPressed,
uint32_t& newMicLevel) {
newMicLevel = static_cast<uint32_t>(ProcessRecordedDataWithAPM(
@@ -92,21 +92,20 @@ int32_t VoEBaseImpl::RecordedDataIsAvailable(
int32_t VoEBaseImpl::NeedMorePlayData(size_t nSamples,
size_t nBytesPerSample,
- uint8_t nChannels, uint32_t samplesPerSec,
+ size_t nChannels, uint32_t samplesPerSec,
void* audioSamples, size_t& nSamplesOut,
int64_t* elapsed_time_ms,
int64_t* ntp_time_ms) {
- GetPlayoutData(static_cast<int>(samplesPerSec), static_cast<int>(nChannels),
- nSamples, true, audioSamples,
- elapsed_time_ms, ntp_time_ms);
+ GetPlayoutData(static_cast<int>(samplesPerSec), nChannels, nSamples, true,
+ audioSamples, elapsed_time_ms, ntp_time_ms);
nSamplesOut = audioFrame_.samples_per_channel_;
return 0;
}
int VoEBaseImpl::OnDataAvailable(const int voe_channels[],
- int number_of_voe_channels,
+ size_t number_of_voe_channels,
const int16_t* audio_data, int sample_rate,
- int number_of_channels,
+ size_t number_of_channels,
size_t number_of_frames,
int audio_delay_milliseconds, int volume,
bool key_pressed, bool need_audio_processing) {
@@ -121,7 +120,7 @@ int VoEBaseImpl::OnDataAvailable(const int voe_channels[],
// No need to go through the APM, demultiplex the data to each VoE channel,
// encode and send to the network.
- for (int i = 0; i < number_of_voe_channels; ++i) {
+ for (size_t i = 0; i < number_of_voe_channels; ++i) {
// TODO(ajm): In the case where multiple channels are using the same codec
// rate, this path needlessly does extra conversions. We should convert once
// and share between channels.
@@ -135,14 +134,14 @@ int VoEBaseImpl::OnDataAvailable(const int voe_channels[],
void VoEBaseImpl::OnData(int voe_channel, const void* audio_data,
int bits_per_sample, int sample_rate,
- int number_of_channels, size_t number_of_frames) {
+ size_t number_of_channels, size_t number_of_frames) {
PushCaptureData(voe_channel, audio_data, bits_per_sample, sample_rate,
number_of_channels, number_of_frames);
}
void VoEBaseImpl::PushCaptureData(int voe_channel, const void* audio_data,
int bits_per_sample, int sample_rate,
- int number_of_channels,
+ size_t number_of_channels,
size_t number_of_frames) {
voe::ChannelOwner ch = shared_->channel_manager().GetChannel(voe_channel);
voe::Channel* channel_ptr = ch.channel();
@@ -158,7 +157,7 @@ void VoEBaseImpl::PushCaptureData(int voe_channel, const void* audio_data,
void VoEBaseImpl::PullRenderData(int bits_per_sample,
int sample_rate,
- int number_of_channels,
+ size_t number_of_channels,
size_t number_of_frames,
void* audio_data, int64_t* elapsed_time_ms,
int64_t* ntp_time_ms) {
@@ -750,8 +749,8 @@ int32_t VoEBaseImpl::TerminateInternal() {
}
int VoEBaseImpl::ProcessRecordedDataWithAPM(
- const int voe_channels[], int number_of_voe_channels,
- const void* audio_data, uint32_t sample_rate, uint8_t number_of_channels,
+ const int voe_channels[], size_t number_of_voe_channels,
+ const void* audio_data, uint32_t sample_rate, size_t number_of_channels,
size_t number_of_frames, uint32_t audio_delay_milliseconds,
int32_t clock_drift, uint32_t volume, bool key_pressed) {
assert(shared_->transmit_mixer() != nullptr);
@@ -816,7 +815,7 @@ int VoEBaseImpl::ProcessRecordedDataWithAPM(
return 0;
}
-void VoEBaseImpl::GetPlayoutData(int sample_rate, int number_of_channels,
+void VoEBaseImpl::GetPlayoutData(int sample_rate, size_t number_of_channels,
size_t number_of_frames, bool feed_data_to_apm,
void* audio_data, int64_t* elapsed_time_ms,
int64_t* ntp_time_ms) {
« no previous file with comments | « webrtc/voice_engine/voe_base_impl.h ('k') | webrtc/voice_engine/voe_codec_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698