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

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: 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
« no previous file with comments | « webrtc/common_audio/lapped_transform.h ('k') | webrtc/common_audio/lapped_transform_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..525450d0cfc6bdfd025177f1d6490f8da2015eeb 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);
+ 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,
« no previous file with comments | « webrtc/common_audio/lapped_transform.h ('k') | webrtc/common_audio/lapped_transform_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698