Reason for revert: Can reland it if backwards compatible API is kept. Original issue's description: > 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} > Committed:e47c1d3ca1TBR=henrika@webrtc.org,henrik.lundin@webrtc.org,kwiberg@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. BUG=webrtc:5268 Review-Url: https://codereview.webrtc.org/2739073003 Cr-Commit-Position: refs/heads/master@{#17144}
50 lines
1.5 KiB
C++
50 lines
1.5 KiB
C++
/*
|
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#ifndef WEBRTC_COMMON_AUDIO_VAD_VAD_UNITTEST_H_
|
|
#define WEBRTC_COMMON_AUDIO_VAD_VAD_UNITTEST_H_
|
|
|
|
#include <stddef.h> // size_t
|
|
|
|
#include "webrtc/test/gtest.h"
|
|
#include "webrtc/typedefs.h"
|
|
|
|
namespace webrtc {
|
|
namespace test {
|
|
|
|
// Modes we support
|
|
const int kModes[] = { 0, 1, 2, 3 };
|
|
const size_t kModesSize = sizeof(kModes) / sizeof(*kModes);
|
|
|
|
// Rates we support.
|
|
const int kRates[] = { 8000, 12000, 16000, 24000, 32000, 48000 };
|
|
const size_t kRatesSize = sizeof(kRates) / sizeof(*kRates);
|
|
|
|
// Frame lengths we support.
|
|
const size_t kMaxFrameLength = 1440;
|
|
const size_t kFrameLengths[] = { 80, 120, 160, 240, 320, 480, 640, 960,
|
|
kMaxFrameLength };
|
|
const size_t kFrameLengthsSize = sizeof(kFrameLengths) / sizeof(*kFrameLengths);
|
|
|
|
} // namespace test
|
|
} // namespace webrtc
|
|
|
|
class VadTest : public ::testing::Test {
|
|
protected:
|
|
VadTest();
|
|
virtual void SetUp();
|
|
virtual void TearDown();
|
|
|
|
// Returns true if the rate and frame length combination is valid.
|
|
bool ValidRatesAndFrameLengths(int rate, size_t frame_length);
|
|
};
|
|
|
|
#endif // WEBRTC_COMMON_AUDIO_VAD_VAD_UNITTEST_H_
|