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

Unified Diff: webrtc/modules/audio_processing/agc/agc_manager_direct.cc

Issue 1227213002: Update audio code to use size_t more correctly, webrtc/modules/audio_processing/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync 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
Index: webrtc/modules/audio_processing/agc/agc_manager_direct.cc
diff --git a/webrtc/modules/audio_processing/agc/agc_manager_direct.cc b/webrtc/modules/audio_processing/agc/agc_manager_direct.cc
index 74f55407a425605e7209fc0e601bb1bfa942f357..48ce2f877c39377abdd58f9fe2dbb7b24780ea8c 100644
--- a/webrtc/modules/audio_processing/agc/agc_manager_direct.cc
+++ b/webrtc/modules/audio_processing/agc/agc_manager_direct.cc
@@ -95,7 +95,7 @@ class DebugFile {
~DebugFile() {
fclose(file_);
}
- void Write(const int16_t* data, int length_samples) {
+ void Write(const int16_t* data, size_t length_samples) {
fwrite(data, 1, length_samples * sizeof(int16_t), file_);
}
private:
@@ -106,7 +106,7 @@ class DebugFile {
}
~DebugFile() {
}
- void Write(const int16_t* data, int length_samples) {
+ void Write(const int16_t* data, size_t length_samples) {
}
#endif // WEBRTC_AGC_DEBUG_DUMP
};
@@ -188,8 +188,8 @@ int AgcManagerDirect::Initialize() {
void AgcManagerDirect::AnalyzePreProcess(int16_t* audio,
int num_channels,
- int samples_per_channel) {
- int length = num_channels * samples_per_channel;
+ size_t samples_per_channel) {
+ size_t length = num_channels * samples_per_channel;
if (capture_muted_) {
return;
}
@@ -230,7 +230,7 @@ void AgcManagerDirect::AnalyzePreProcess(int16_t* audio,
}
void AgcManagerDirect::Process(const int16_t* audio,
- int length,
+ size_t length,
int sample_rate_hz) {
if (capture_muted_) {
return;
« no previous file with comments | « webrtc/modules/audio_processing/agc/agc_manager_direct.h ('k') | webrtc/modules/audio_processing/agc/legacy/analog_agc.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698