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

Unified Diff: webrtc/modules/audio_processing/audio_processing_impl.h

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: 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/audio_processing_impl.h
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.h b/webrtc/modules/audio_processing/audio_processing_impl.h
index bbd17191585037e9fa739a1390f5013023a4ba8e..0464fcaee343304f772ec3b9ca6e45d2a0c96577 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.h
+++ b/webrtc/modules/audio_processing/audio_processing_impl.h
@@ -54,15 +54,16 @@ class AudioRate {
void set(int rate) {
rate_ = rate;
- samples_per_channel_ = AudioProcessing::kChunkSizeMs * rate_ / 1000;
+ samples_per_channel_ =
+ static_cast<size_t>(AudioProcessing::kChunkSizeMs * rate_ / 1000);
}
int rate() const { return rate_; }
- int samples_per_channel() const { return samples_per_channel_; }
+ size_t samples_per_channel() const { return samples_per_channel_; }
private:
int rate_;
- int samples_per_channel_;
+ size_t samples_per_channel_;
};
class AudioFormat : public AudioRate {
@@ -112,7 +113,7 @@ class AudioProcessingImpl : public AudioProcessing {
bool output_will_be_muted() const override;
int ProcessStream(AudioFrame* frame) override;
int ProcessStream(const float* const* src,
- int samples_per_channel,
+ size_t samples_per_channel,
int input_sample_rate_hz,
ChannelLayout input_layout,
int output_sample_rate_hz,
@@ -120,7 +121,7 @@ class AudioProcessingImpl : public AudioProcessing {
float* const* dest) override;
int AnalyzeReverseStream(AudioFrame* frame) override;
int AnalyzeReverseStream(const float* const* data,
- int samples_per_channel,
+ size_t samples_per_channel,
int sample_rate_hz,
ChannelLayout layout) override;
int set_stream_delay_ms(int delay) override;

Powered by Google App Engine
This is Rietveld 408576698