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

Unified Diff: webrtc/common_audio/blocker.h

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/audio_util_unittest.cc ('k') | webrtc/common_audio/blocker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_audio/blocker.h
diff --git a/webrtc/common_audio/blocker.h b/webrtc/common_audio/blocker.h
index 00f372dfd0ed15f5ca4e6f79d6e4ddafe0e6c663..025638ae8c462acdd38f0be685b5bd74f940f898 100644
--- a/webrtc/common_audio/blocker.h
+++ b/webrtc/common_audio/blocker.h
@@ -25,7 +25,7 @@ class BlockerCallback {
virtual ~BlockerCallback() {}
virtual void ProcessBlock(const float* const* input,
- int num_frames,
+ size_t num_frames,
int num_input_channels,
int num_output_channels,
float* const* output) = 0;
@@ -63,34 +63,34 @@ class BlockerCallback {
// copy of window and does not attempt to delete it.
class Blocker {
public:
- Blocker(int chunk_size,
- int block_size,
+ Blocker(size_t chunk_size,
+ size_t block_size,
int num_input_channels,
int num_output_channels,
const float* window,
- int shift_amount,
+ size_t shift_amount,
BlockerCallback* callback);
void ProcessChunk(const float* const* input,
- int chunk_size,
+ size_t chunk_size,
int num_input_channels,
int num_output_channels,
float* const* output);
private:
- const int chunk_size_;
- const int block_size_;
+ const size_t chunk_size_;
+ const size_t block_size_;
const int num_input_channels_;
const int num_output_channels_;
// The number of frames of delay to add at the beginning of the first chunk.
- const int initial_delay_;
+ const size_t initial_delay_;
// The frame index into the input buffer where the first block should be read
// from. This is necessary because shift_amount_ is not necessarily a
// multiple of chunk_size_, so blocks won't line up at the start of the
// buffer.
- int frame_offset_;
+ size_t frame_offset_;
// Since blocks nearly always overlap, there are certain blocks that require
// frames from the end of one chunk and the beginning of the next chunk. The
@@ -113,7 +113,7 @@ class Blocker {
// The amount of frames between the start of contiguous blocks. For example,
// |shift_amount_| = |block_size_| / 2 for a Hann window.
- int shift_amount_;
+ size_t shift_amount_;
BlockerCallback* callback_;
};
« no previous file with comments | « webrtc/common_audio/audio_util_unittest.cc ('k') | webrtc/common_audio/blocker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698