Formatting ACM tests

Pure formatting of all files located in /webrtc/modules/audio_coding/main/test/

Smaller manual modifications done after using Eclipse formatting tool, like wrapping long lines (mostly comments).

BUG=issue1024

Review URL: https://webrtc-codereview.appspot.com/1342004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3946 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
tina.legrand@webrtc.org
2013-05-03 07:34:12 +00:00
parent 03efc89151
commit d5726a1286
34 changed files with 4385 additions and 5230 deletions

View File

@ -30,8 +30,8 @@ PCMFile::PCMFile()
rewinded_(false),
read_stereo_(false),
save_stereo_(false) {
timestamp_ = (((uint32_t)rand() & 0x0000FFFF) << 16) |
((uint32_t)rand() & 0x0000FFFF);
timestamp_ = (((uint32_t) rand() & 0x0000FFFF) << 16) |
((uint32_t) rand() & 0x0000FFFF);
}
PCMFile::PCMFile(uint32_t timestamp)
@ -84,8 +84,7 @@ int16_t PCMFile::ChooseFile(std::string* file_name, int16_t max_len) {
return 0;
}
int16_t PCMFile::ChooseFile(std::string* file_name,
int16_t max_len,
int16_t PCMFile::ChooseFile(std::string* file_name, int16_t max_len,
uint16_t* frequency_hz) {
char tmp_name[MAX_FILE_NAME_LENGTH_BYTE];
@ -158,10 +157,8 @@ int32_t PCMFile::Read10MsData(AudioFrame& audio_frame) {
channels = 2;
}
int32_t payload_size = (int32_t) fread(audio_frame.data_,
sizeof(uint16_t),
samples_10ms_ * channels,
pcm_file_);
int32_t payload_size = (int32_t) fread(audio_frame.data_, sizeof(uint16_t),
samples_10ms_ * channels, pcm_file_);
if (payload_size < samples_10ms_ * channels) {
for (int k = payload_size; k < samples_10ms_ * channels; k++) {
audio_frame.data_[k] = 0;
@ -190,8 +187,7 @@ void PCMFile::Write10MsData(AudioFrame& audio_frame) {
return;
}
} else {
int16_t* stereo_audio =
new int16_t[2 * audio_frame.samples_per_channel_];
int16_t* stereo_audio = new int16_t[2 * audio_frame.samples_per_channel_];
int k;
for (k = 0; k < audio_frame.samples_per_channel_; k++) {
stereo_audio[k << 1] = audio_frame.data_[k];
@ -207,17 +203,17 @@ void PCMFile::Write10MsData(AudioFrame& audio_frame) {
} else {
if (fwrite(audio_frame.data_, sizeof(int16_t),
audio_frame.num_channels_ * audio_frame.samples_per_channel_,
pcm_file_) != static_cast<size_t>(
audio_frame.num_channels_ * audio_frame.samples_per_channel_)) {
pcm_file_) !=
static_cast<size_t>(audio_frame.num_channels_ *
audio_frame.samples_per_channel_)) {
return;
}
}
}
void PCMFile::Write10MsData(int16_t* playout_buffer,
uint16_t length_smpls) {
if (fwrite(playout_buffer, sizeof(uint16_t),
length_smpls, pcm_file_) != length_smpls) {
void PCMFile::Write10MsData(int16_t* playout_buffer, uint16_t length_smpls) {
if (fwrite(playout_buffer, sizeof(uint16_t), length_smpls, pcm_file_) !=
length_smpls) {
return;
}
}