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

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
« no previous file with comments | « webrtc/common_audio/audio_converter_unittest.cc ('k') | webrtc/common_audio/audio_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a83c87599c414c127e95881e88873d4100ff237b..a7a6a9442bca8d0f83641b7652b71a58a83e6950 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());
}
« no previous file with comments | « webrtc/common_audio/audio_converter_unittest.cc ('k') | webrtc/common_audio/audio_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698