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

Unified Diff: webrtc/common_audio/lapped_transform.cc

Issue 1227203003: Update audio code to use size_t more correctly, webrtc/common_audio/ portion. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
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
Index: webrtc/common_audio/lapped_transform.cc
diff --git a/webrtc/common_audio/lapped_transform.cc b/webrtc/common_audio/lapped_transform.cc
index 0239498547c66dc3ad90dbfd657055d1f2fd167f..21aaecf9f34d5e226e44da5ada8ac6600ec434cf 100644
--- a/webrtc/common_audio/lapped_transform.cc
+++ b/webrtc/common_audio/lapped_transform.cc
@@ -20,7 +20,7 @@
namespace webrtc {
void LappedTransform::BlockThunk::ProcessBlock(const float* const* input,
- int num_frames,
+ size_t num_frames,
int num_input_channels,
int num_output_channels,
float* const* output) {
@@ -35,7 +35,7 @@ void LappedTransform::BlockThunk::ProcessBlock(const float* const* input,
parent_->cplx_pre_.Row(i));
}
- int block_length = RealFourier::ComplexLength(
+ size_t block_length = RealFourier::ComplexLength(
RealFourier::FftOrder(num_frames));
CHECK_EQ(parent_->cplx_length_, block_length);
parent_->block_processor_->ProcessAudioBlock(parent_->cplx_pre_.Array(),
@@ -54,10 +54,10 @@ void LappedTransform::BlockThunk::ProcessBlock(const float* const* input,
LappedTransform::LappedTransform(int num_in_channels,
int num_out_channels,
- int chunk_length,
+ size_t chunk_length,
const float* window,
- int block_length,
- int shift_amount,
+ size_t block_length,
+ size_t shift_amount,
Callback* callback)
: blocker_callback_(this),
num_in_channels_(num_in_channels),
@@ -84,12 +84,12 @@ LappedTransform::LappedTransform(int num_in_channels,
cplx_length_,
RealFourier::kFftBufferAlignment) {
CHECK(num_in_channels_ > 0 && num_out_channels_ > 0);
- CHECK_GT(block_length_, 0);
- CHECK_GT(chunk_length_, 0);
+ CHECK_GT(block_length_, 0U);
Andrew MacDonald 2015/07/24 19:01:55 My impression is that a lowercase u suffix is more
Peter Kasting 2015/07/27 23:23:39 I have no preference, changed to 'u'.
+ CHECK_GT(chunk_length_, 0U);
CHECK(block_processor_);
// block_length_ power of 2?
- CHECK_EQ(0, block_length_ & (block_length_ - 1));
+ CHECK_EQ(0U, block_length_ & (block_length_ - 1));
}
void LappedTransform::ProcessChunk(const float* const* in_chunk,

Powered by Google App Engine
This is Rietveld 408576698