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

Unified Diff: webrtc/modules/audio_device/android/fine_audio_buffer.h

Issue 1305983003: Convert some more things to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Support Android's C89 mode 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_device/android/fine_audio_buffer.h
diff --git a/webrtc/modules/audio_device/android/fine_audio_buffer.h b/webrtc/modules/audio_device/android/fine_audio_buffer.h
index dce40beb7846e25093c51157b11a1a6529be1947..3534271ece812397168a68d305d60245aa56987b 100644
--- a/webrtc/modules/audio_device/android/fine_audio_buffer.h
+++ b/webrtc/modules/audio_device/android/fine_audio_buffer.h
@@ -32,7 +32,7 @@ class FineAudioBuffer {
// |device_buffer| delivers 10ms of data. Given the sample rate the number
// of samples can be calculated.
FineAudioBuffer(AudioDeviceBuffer* device_buffer,
- int desired_frame_size_bytes,
+ size_t desired_frame_size_bytes,
int sample_rate);
~FineAudioBuffer();
@@ -40,7 +40,7 @@ class FineAudioBuffer {
// buffer is smaller memory trampling will happen.
// |desired_frame_size_bytes| and |samples_rate| are as described in the
// constructor.
- int RequiredBufferSizeBytes();
+ size_t RequiredBufferSizeBytes();
// |buffer| must be of equal or greater size than what is returned by
// RequiredBufferSize. This is to avoid unnecessary memcpy.
@@ -50,18 +50,18 @@ class FineAudioBuffer {
// Device buffer that provides 10ms chunks of data.
AudioDeviceBuffer* device_buffer_;
// Number of bytes delivered per GetBufferData
- int desired_frame_size_bytes_;
+ size_t desired_frame_size_bytes_;
int sample_rate_;
- int samples_per_10_ms_;
+ size_t samples_per_10_ms_;
// Convenience parameter to avoid converting from samples
- int bytes_per_10_ms_;
+ size_t bytes_per_10_ms_;
// Storage for samples that are not yet asked for.
rtc::scoped_ptr<int8_t[]> cache_buffer_;
// Location of first unread sample.
- int cached_buffer_start_;
+ size_t cached_buffer_start_;
// Number of bytes stored in cache.
- int cached_bytes_;
+ size_t cached_bytes_;
};
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698