Reformat the WebRTC code base
Running clang-format with chromium's style guide. The goal is n-fold: * providing consistency and readability (that's what code guidelines are for) * preventing noise with presubmit checks and git cl format * building on the previous point: making it easier to automatically fix format issues * you name it Please consider using git-hyper-blame to ignore this commit. Bug: webrtc:9340 Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87 Reviewed-on: https://webrtc-review.googlesource.com/81185 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23660}
This commit is contained in:
@ -41,11 +41,11 @@ void SetISACConfigDefault(ACMTestISACConfig& isacConfig) {
|
||||
return;
|
||||
}
|
||||
|
||||
int16_t SetISAConfig(ACMTestISACConfig& isacConfig, AudioCodingModule* acm,
|
||||
int16_t SetISAConfig(ACMTestISACConfig& isacConfig,
|
||||
AudioCodingModule* acm,
|
||||
int testMode) {
|
||||
|
||||
if ((isacConfig.currentRateBitPerSec != 0)
|
||||
|| (isacConfig.currentFrameSizeMsec != 0)) {
|
||||
if ((isacConfig.currentRateBitPerSec != 0) ||
|
||||
(isacConfig.currentFrameSizeMsec != 0)) {
|
||||
auto sendCodec = acm->SendCodec();
|
||||
EXPECT_TRUE(sendCodec);
|
||||
if (isacConfig.currentRateBitPerSec < 0) {
|
||||
@ -57,8 +57,8 @@ int16_t SetISAConfig(ACMTestISACConfig& isacConfig, AudioCodingModule* acm,
|
||||
sendCodec->rate = isacConfig.currentRateBitPerSec;
|
||||
}
|
||||
if (isacConfig.currentFrameSizeMsec != 0) {
|
||||
sendCodec->pacsize = isacConfig.currentFrameSizeMsec
|
||||
* (sendCodec->plfreq / 1000);
|
||||
sendCodec->pacsize =
|
||||
isacConfig.currentFrameSizeMsec * (sendCodec->plfreq / 1000);
|
||||
}
|
||||
EXPECT_EQ(0, acm->RegisterSendCodec(*sendCodec));
|
||||
}
|
||||
@ -81,15 +81,15 @@ void ISACTest::Setup() {
|
||||
CodecInst codecParam;
|
||||
|
||||
for (codecCntr = 0; codecCntr < AudioCodingModule::NumberOfCodecs();
|
||||
codecCntr++) {
|
||||
codecCntr++) {
|
||||
EXPECT_EQ(0, AudioCodingModule::Codec(codecCntr, &codecParam));
|
||||
if (!STR_CASE_CMP(codecParam.plname, "ISAC")
|
||||
&& codecParam.plfreq == 16000) {
|
||||
if (!STR_CASE_CMP(codecParam.plname, "ISAC") &&
|
||||
codecParam.plfreq == 16000) {
|
||||
memcpy(&_paramISAC16kHz, &codecParam, sizeof(CodecInst));
|
||||
_idISAC16kHz = codecCntr;
|
||||
}
|
||||
if (!STR_CASE_CMP(codecParam.plname, "ISAC")
|
||||
&& codecParam.plfreq == 32000) {
|
||||
if (!STR_CASE_CMP(codecParam.plname, "ISAC") &&
|
||||
codecParam.plfreq == 32000) {
|
||||
memcpy(&_paramISAC32kHz, &codecParam, sizeof(CodecInst));
|
||||
_idISAC32kHz = codecCntr;
|
||||
}
|
||||
@ -115,8 +115,8 @@ void ISACTest::Setup() {
|
||||
EXPECT_EQ(0, _acmB->RegisterTransportCallback(_channel_B2A.get()));
|
||||
_channel_B2A->RegisterReceiverACM(_acmA.get());
|
||||
|
||||
file_name_swb_ = webrtc::test::ResourcePath("audio_coding/testfile32kHz",
|
||||
"pcm");
|
||||
file_name_swb_ =
|
||||
webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm");
|
||||
|
||||
EXPECT_EQ(0, _acmB->RegisterSendCodec(_paramISAC16kHz));
|
||||
EXPECT_EQ(0, _acmA->RegisterSendCodec(_paramISAC32kHz));
|
||||
@ -213,7 +213,8 @@ void ISACTest::Run10ms() {
|
||||
_outFileB.Write10MsData(audioFrame);
|
||||
}
|
||||
|
||||
void ISACTest::EncodeDecode(int testNr, ACMTestISACConfig& wbISACConfig,
|
||||
void ISACTest::EncodeDecode(int testNr,
|
||||
ACMTestISACConfig& wbISACConfig,
|
||||
ACMTestISACConfig& swbISACConfig) {
|
||||
// Files in Side A and B
|
||||
_inFileA.Open(file_name_swb_, 32000, "rb", true);
|
||||
@ -241,8 +242,8 @@ void ISACTest::EncodeDecode(int testNr, ACMTestISACConfig& wbISACConfig,
|
||||
SetISAConfig(wbISACConfig, _acmB.get(), _testMode);
|
||||
|
||||
bool adaptiveMode = false;
|
||||
if ((swbISACConfig.currentRateBitPerSec == -1)
|
||||
|| (wbISACConfig.currentRateBitPerSec == -1)) {
|
||||
if ((swbISACConfig.currentRateBitPerSec == -1) ||
|
||||
(wbISACConfig.currentRateBitPerSec == -1)) {
|
||||
adaptiveMode = true;
|
||||
}
|
||||
_myTimer.Reset();
|
||||
|
||||
Reference in New Issue
Block a user