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:
@ -60,8 +60,7 @@ TwoWayCommunication::~TwoWayCommunication() {
|
||||
_outFileRefB.Close();
|
||||
}
|
||||
|
||||
void TwoWayCommunication::ChooseCodec(uint8_t* codecID_A,
|
||||
uint8_t* codecID_B) {
|
||||
void TwoWayCommunication::ChooseCodec(uint8_t* codecID_A, uint8_t* codecID_B) {
|
||||
std::unique_ptr<AudioCodingModule> tmpACM(AudioCodingModule::Create(
|
||||
AudioCodingModule::Config(CreateBuiltinAudioDecoderFactory())));
|
||||
uint8_t noCodec = tmpACM->NumberOfCodecs();
|
||||
@ -75,11 +74,11 @@ void TwoWayCommunication::ChooseCodec(uint8_t* codecID_A,
|
||||
printf("\nChoose a send codec for side A [0]: ");
|
||||
char myStr[15] = "";
|
||||
EXPECT_TRUE(fgets(myStr, 10, stdin) != NULL);
|
||||
*codecID_A = (uint8_t) atoi(myStr);
|
||||
*codecID_A = (uint8_t)atoi(myStr);
|
||||
|
||||
printf("\nChoose a send codec for side B [0]: ");
|
||||
EXPECT_TRUE(fgets(myStr, 10, stdin) != NULL);
|
||||
*codecID_B = (uint8_t) atoi(myStr);
|
||||
*codecID_B = (uint8_t)atoi(myStr);
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
@ -118,8 +117,8 @@ void TwoWayCommunication::SetUp() {
|
||||
uint16_t frequencyHz;
|
||||
|
||||
//--- Input A
|
||||
std::string in_file_name = webrtc::test::ResourcePath(
|
||||
"audio_coding/testfile32kHz", "pcm");
|
||||
std::string in_file_name =
|
||||
webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm");
|
||||
frequencyHz = 32000;
|
||||
printf("Enter input file at side A [%s]: ", in_file_name.c_str());
|
||||
PCMFile::ChooseFile(&in_file_name, 499, &frequencyHz);
|
||||
@ -134,8 +133,8 @@ void TwoWayCommunication::SetUp() {
|
||||
_outFileRefA.Open(ref_file_name, frequencyHz, "wb");
|
||||
|
||||
//--- Input B
|
||||
in_file_name = webrtc::test::ResourcePath("audio_coding/testfile32kHz",
|
||||
"pcm");
|
||||
in_file_name =
|
||||
webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm");
|
||||
frequencyHz = 32000;
|
||||
printf("\n\nEnter input file at side B [%s]: ", in_file_name.c_str());
|
||||
PCMFile::ChooseFile(&in_file_name, 499, &frequencyHz);
|
||||
@ -200,8 +199,8 @@ void TwoWayCommunication::SetUpAutotest() {
|
||||
uint16_t frequencyHz;
|
||||
|
||||
//--- Input A and B
|
||||
std::string in_file_name = webrtc::test::ResourcePath(
|
||||
"audio_coding/testfile32kHz", "pcm");
|
||||
std::string in_file_name =
|
||||
webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm");
|
||||
frequencyHz = 16000;
|
||||
_inFileA.Open(in_file_name, frequencyHz, "rb");
|
||||
_inFileB.Open(in_file_name, frequencyHz, "rb");
|
||||
@ -210,16 +209,16 @@ void TwoWayCommunication::SetUpAutotest() {
|
||||
std::string output_file_a = webrtc::test::OutputPath() + "outAutotestA.pcm";
|
||||
frequencyHz = 16000;
|
||||
_outFileA.Open(output_file_a, frequencyHz, "wb");
|
||||
std::string output_ref_file_a = webrtc::test::OutputPath()
|
||||
+ "ref_outAutotestA.pcm";
|
||||
std::string output_ref_file_a =
|
||||
webrtc::test::OutputPath() + "ref_outAutotestA.pcm";
|
||||
_outFileRefA.Open(output_ref_file_a, frequencyHz, "wb");
|
||||
|
||||
//--- Output B
|
||||
std::string output_file_b = webrtc::test::OutputPath() + "outAutotestB.pcm";
|
||||
frequencyHz = 16000;
|
||||
_outFileB.Open(output_file_b, frequencyHz, "wb");
|
||||
std::string output_ref_file_b = webrtc::test::OutputPath()
|
||||
+ "ref_outAutotestB.pcm";
|
||||
std::string output_ref_file_b =
|
||||
webrtc::test::OutputPath() + "ref_outAutotestB.pcm";
|
||||
_outFileRefB.Open(output_ref_file_b, frequencyHz, "wb");
|
||||
|
||||
//--- Set A-to-B channel
|
||||
|
Reference in New Issue
Block a user