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

Unified Diff: webrtc/modules/audio_coding/neteq/preemptive_expand.h

Issue 1230503003: Update a ton of audio code to use size_t more correctly and in general reduce (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 4 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_coding/neteq/preemptive_expand.h
diff --git a/webrtc/modules/audio_coding/neteq/preemptive_expand.h b/webrtc/modules/audio_coding/neteq/preemptive_expand.h
index 65da7032b82214b18612a0baaaf116fd1344e01c..ca48e197872fc8003301a5a933214ed7c7c4aaa0 100644
--- a/webrtc/modules/audio_coding/neteq/preemptive_expand.h
+++ b/webrtc/modules/audio_coding/neteq/preemptive_expand.h
@@ -32,9 +32,9 @@ class PreemptiveExpand : public TimeStretch {
PreemptiveExpand(int sample_rate_hz,
size_t num_channels,
const BackgroundNoise& background_noise,
- int overlap_samples)
+ size_t overlap_samples)
: TimeStretch(sample_rate_hz, num_channels, background_noise),
- old_data_length_per_channel_(-1),
+ old_data_length_per_channel_(0),
overlap_samples_(overlap_samples) {
}
@@ -44,17 +44,17 @@ class PreemptiveExpand : public TimeStretch {
// is provided in the output |length_change_samples|. The method returns
// the outcome of the operation as an enumerator value.
ReturnCodes Process(const int16_t *pw16_decoded,
- int len,
- int old_data_len,
+ size_t len,
+ size_t old_data_len,
AudioMultiVector* output,
- int16_t* length_change_samples);
+ size_t* length_change_samples);
protected:
// Sets the parameters |best_correlation| and |peak_index| to suitable
// values when the signal contains no active speech.
void SetParametersForPassiveSpeech(size_t input_length,
int16_t* best_correlation,
- int* peak_index) const override;
+ size_t* peak_index) const override;
// Checks the criteria for performing the time-stretching operation and,
// if possible, performs the time-stretching.
@@ -67,8 +67,8 @@ class PreemptiveExpand : public TimeStretch {
AudioMultiVector* output) const override;
private:
- int old_data_length_per_channel_;
- int overlap_samples_;
+ size_t old_data_length_per_channel_;
+ size_t overlap_samples_;
DISALLOW_COPY_AND_ASSIGN(PreemptiveExpand);
};
@@ -81,7 +81,7 @@ struct PreemptiveExpandFactory {
int sample_rate_hz,
size_t num_channels,
const BackgroundNoise& background_noise,
- int overlap_samples) const;
+ size_t overlap_samples) const;
};
} // namespace webrtc
« no previous file with comments | « webrtc/modules/audio_coding/neteq/post_decode_vad.cc ('k') | webrtc/modules/audio_coding/neteq/preemptive_expand.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698