Move one CircularBuffer to webrtc::test namespace.

There are currently two webrtc::CircularBuffers defined:
- modules/audio_coding/test/utility.{h,cc}
- modules/audio_processing/echo_detector/circular_buffer.{h,cc}

This CL moves the former definition to the webrtc::test namespace,
to avoid link errors in a future build target.

BUG=None

Review-Url: https://codereview.webrtc.org/2667383008
Cr-Commit-Position: refs/heads/master@{#16553}
This commit is contained in:
brandtr
2017-02-11 00:24:10 -08:00
committed by Commit bot
parent 19c1830c7e
commit 6607d84b44
3 changed files with 10 additions and 1 deletions

View File

@ -678,7 +678,7 @@ void APITest::TestDelay(char side) {
double averageEstimDelay = 0;
double averageDelay = 0;
CircularBuffer estimDelayCB(100);
test::CircularBuffer estimDelayCB(100);
estimDelayCB.SetArithMean(true);
if (side == 'A') {

View File

@ -136,6 +136,8 @@ void PrintCodecs() {
}
namespace test {
CircularBuffer::CircularBuffer(uint32_t len)
: _buff(NULL),
_idx(0),
@ -265,6 +267,8 @@ int16_t CircularBuffer::Variance(double& var) {
}
}
} // namespace test
bool FixedPayloadTypeCodec(const char* payloadName) {
char fixPayloadTypeCodecs[NUM_CODECS_WITH_FIXED_PAYLOAD_TYPE][32] = { "PCMU",
"PCMA", "GSM", "G723", "DVI4", "LPC", "PCMA", "G722", "QCELP", "CN",

View File

@ -83,6 +83,9 @@ class ACMTestTimer {
unsigned long _hour;
};
// To avoid clashes with CircularBuffer in APM.
namespace test {
class CircularBuffer {
public:
CircularBuffer(uint32_t len);
@ -109,6 +112,8 @@ class CircularBuffer {
double _sumSqr;
};
} // namespace test
int16_t ChooseCodec(CodecInst& codecInst);
void PrintCodecs();