diff --git a/webrtc/modules/audio_coding/main/test/PCMFile.cc b/webrtc/modules/audio_coding/main/test/PCMFile.cc index b7e65dd3f1..ce189548fb 100644 --- a/webrtc/modules/audio_coding/main/test/PCMFile.cc +++ b/webrtc/modules/audio_coding/main/test/PCMFile.cc @@ -46,44 +46,6 @@ PCMFile::PCMFile(uint32_t timestamp) timestamp_ = timestamp; } -int16_t PCMFile::ChooseFile(std::string* file_name, int16_t max_len) { - char tmp_name[MAX_FILE_NAME_LENGTH_BYTE]; - - EXPECT_TRUE(fgets(tmp_name, MAX_FILE_NAME_LENGTH_BYTE, stdin) != NULL); - tmp_name[MAX_FILE_NAME_LENGTH_BYTE - 1] = '\0'; - int16_t n = 0; - - // Removing leading spaces. - while ((isspace(tmp_name[n]) || iscntrl(tmp_name[n])) && (tmp_name[n] != 0) - && (n < MAX_FILE_NAME_LENGTH_BYTE)) { - n++; - } - if (n > 0) { - memmove(tmp_name, &tmp_name[n], MAX_FILE_NAME_LENGTH_BYTE - n); - } - - // Removing trailing spaces. - n = (int16_t)(strlen(tmp_name) - 1); - if (n >= 0) { - while ((isspace(tmp_name[n]) || iscntrl(tmp_name[n])) && (n >= 0)) { - n--; - } - } - if (n >= 0) { - tmp_name[n + 1] = '\0'; - } - - int16_t len = (int16_t) strlen(tmp_name); - if (len > max_len) { - return -1; - } - if (len > 0) { - std::string tmp_string(tmp_name, len + 1); - *file_name = tmp_string; - } - return 0; -} - int16_t PCMFile::ChooseFile(std::string* file_name, int16_t max_len, uint16_t* frequency_hz) { char tmp_name[MAX_FILE_NAME_LENGTH_BYTE]; diff --git a/webrtc/modules/audio_coding/main/test/PCMFile.h b/webrtc/modules/audio_coding/main/test/PCMFile.h index e7387a6bf6..568b30472b 100644 --- a/webrtc/modules/audio_coding/main/test/PCMFile.h +++ b/webrtc/modules/audio_coding/main/test/PCMFile.h @@ -48,7 +48,6 @@ class PCMFile { void Rewind(); static int16_t ChooseFile(std::string* file_name, int16_t max_len, uint16_t* frequency_hz); - static int16_t ChooseFile(std::string* file_name, int16_t max_len); bool Rewinded(); void SaveStereo(bool is_stereo = true); void ReadStereo(bool is_stereo = true);