Revert of Enable cpplint and fix cpplint errors in webrtc/*audio (patchset #4 id:180001 of https://codereview.webrtc.org/2683033004/ )

Reason for revert:
The API change in audio/utility/audio_frame_operations.h caused breakage. Need to keep backward-compatible API.

Original issue's description:
> Enable cpplint and fix cpplint errors in webrtc/*audio
>
> Change usage accordingly throughout the codebase
>
> BUG=webrtc:5268
>
> TESTED=Fixed issues reported by:
> find webrtc/*audio -type f -name *.cc -o -name *.h | xargs cpplint.py
>
> Review-Url: https://codereview.webrtc.org/2683033004
> Cr-Commit-Position: refs/heads/master@{#17133}
> Committed: aebe55ca6c

TBR=henrika@webrtc.org,henrik.lundin@webrtc.org,kwiberg@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5268

Review-Url: https://codereview.webrtc.org/2739143002
Cr-Commit-Position: refs/heads/master@{#17138}
This commit is contained in:
oprypin
2017-03-09 02:43:31 -08:00
committed by Commit bot
parent f5318e1f39
commit e47c1d3ca1
33 changed files with 1068 additions and 1012 deletions

View File

@ -58,8 +58,7 @@ static void RandomStressTest(int** data_ptr) {
printf("seed=%u\n", seed);
srand(seed);
for (int i = 0; i < kNumTests; i++) {
// rand_r is not supported on many platforms, so rand is used.
const int buffer_size = std::max(rand() % kMaxBufferSize, 1); // NOLINT
const int buffer_size = std::max(rand() % kMaxBufferSize, 1);
std::unique_ptr<int[]> write_data(new int[buffer_size]);
std::unique_ptr<int[]> read_data(new int[buffer_size]);
scoped_ring_buffer buffer(WebRtc_CreateBuffer(buffer_size, sizeof(int)));
@ -69,8 +68,8 @@ static void RandomStressTest(int** data_ptr) {
int write_element = 0;
int read_element = 0;
for (int j = 0; j < kNumOps; j++) {
const bool write = rand() % 2 == 0 ? true : false; // NOLINT
const int num_elements = rand() % buffer_size; // NOLINT
const bool write = rand() % 2 == 0 ? true : false;
const int num_elements = rand() % buffer_size;
if (write) {
const int buffer_available = buffer_size - buffer_consumed;
ASSERT_EQ(static_cast<size_t>(buffer_available),