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

Unified Diff: webrtc/common_audio/audio_ring_buffer_unittest.cc

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
Index: webrtc/common_audio/audio_ring_buffer_unittest.cc
diff --git a/webrtc/common_audio/audio_ring_buffer_unittest.cc b/webrtc/common_audio/audio_ring_buffer_unittest.cc
index 65d7136de1aeeae05fd76b0136daa87fa3bc03b8..c640a74b8c57066b53978376a11a5bb48f903544 100644
--- a/webrtc/common_audio/audio_ring_buffer_unittest.cc
+++ b/webrtc/common_audio/audio_ring_buffer_unittest.cc
@@ -34,27 +34,27 @@ void ReadAndWriteTest(const ChannelBuffer<float>& input,
while (input_pos + buf.WriteFramesAvailable() < total_frames) {
// Write until the buffer is as full as possible.
while (buf.WriteFramesAvailable() >= num_write_chunk_frames) {
- buf.Write(input.Slice(slice.get(), static_cast<int>(input_pos)),
- num_channels, num_write_chunk_frames);
+ buf.Write(input.Slice(slice.get(), input_pos), num_channels,
+ num_write_chunk_frames);
input_pos += num_write_chunk_frames;
}
// Read until the buffer is as empty as possible.
while (buf.ReadFramesAvailable() >= num_read_chunk_frames) {
EXPECT_LT(output_pos, total_frames);
- buf.Read(output->Slice(slice.get(), static_cast<int>(output_pos)),
- num_channels, num_read_chunk_frames);
+ buf.Read(output->Slice(slice.get(), output_pos), num_channels,
+ num_read_chunk_frames);
output_pos += num_read_chunk_frames;
}
}
// Write and read the last bit.
if (input_pos < total_frames) {
- buf.Write(input.Slice(slice.get(), static_cast<int>(input_pos)),
- num_channels, total_frames - input_pos);
+ buf.Write(input.Slice(slice.get(), input_pos), num_channels,
+ total_frames - input_pos);
}
if (buf.ReadFramesAvailable()) {
- buf.Read(output->Slice(slice.get(), static_cast<int>(output_pos)),
- num_channels, buf.ReadFramesAvailable());
+ buf.Read(output->Slice(slice.get(), output_pos), num_channels,
+ buf.ReadFramesAvailable());
}
EXPECT_EQ(0u, buf.ReadFramesAvailable());
}

Powered by Google App Engine
This is Rietveld 408576698