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

Unified Diff: webrtc/common_audio/audio_converter.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
« no previous file with comments | « talk/media/webrtc/webrtcvoiceengine.cc ('k') | webrtc/common_audio/audio_converter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_audio/audio_converter.h
diff --git a/webrtc/common_audio/audio_converter.h b/webrtc/common_audio/audio_converter.h
index 772872fcd6d14dfb02be5db06ebbd4b512465191..407b5ff9e7321d28dc619b7a809a213648479160 100644
--- a/webrtc/common_audio/audio_converter.h
+++ b/webrtc/common_audio/audio_converter.h
@@ -27,9 +27,9 @@ class AudioConverter {
// Returns a new AudioConverter, which will use the supplied format for its
// lifetime. Caller is responsible for the memory.
static rtc::scoped_ptr<AudioConverter> Create(int src_channels,
- int src_frames,
+ size_t src_frames,
int dst_channels,
- int dst_frames);
+ size_t dst_frames);
virtual ~AudioConverter() {};
// Convert |src|, containing |src_size| samples, to |dst|, having a sample
@@ -40,23 +40,23 @@ class AudioConverter {
float* const* dst, size_t dst_capacity) = 0;
int src_channels() const { return src_channels_; }
- int src_frames() const { return src_frames_; }
+ size_t src_frames() const { return src_frames_; }
int dst_channels() const { return dst_channels_; }
- int dst_frames() const { return dst_frames_; }
+ size_t dst_frames() const { return dst_frames_; }
protected:
AudioConverter();
- AudioConverter(int src_channels, int src_frames, int dst_channels,
- int dst_frames);
+ AudioConverter(int src_channels, size_t src_frames, int dst_channels,
+ size_t dst_frames);
// Helper to CHECK that inputs are correctly sized.
void CheckSizes(size_t src_size, size_t dst_capacity) const;
private:
const int src_channels_;
- const int src_frames_;
+ const size_t src_frames_;
const int dst_channels_;
- const int dst_frames_;
+ const size_t dst_frames_;
DISALLOW_COPY_AND_ASSIGN(AudioConverter);
};
« no previous file with comments | « talk/media/webrtc/webrtcvoiceengine.cc ('k') | webrtc/common_audio/audio_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698