OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 if (num_output_channels == 1) { | 262 if (num_output_channels == 1) { |
263 ss << "mono"; | 263 ss << "mono"; |
264 } else if (num_output_channels == 2) { | 264 } else if (num_output_channels == 2) { |
265 ss << "stereo"; | 265 ss << "stereo"; |
266 } else { | 266 } else { |
267 assert(false); | 267 assert(false); |
268 } | 268 } |
269 ss << output_rate / 1000 << "_pcm"; | 269 ss << output_rate / 1000 << "_pcm"; |
270 | 270 |
271 std::string filename = ss.str(); | 271 std::string filename = ss.str(); |
272 if (temp_filenames[filename] == "") | 272 if (temp_filenames[filename].empty()) |
273 temp_filenames[filename] = test::TempFilename(test::OutputPath(), filename); | 273 temp_filenames[filename] = test::TempFilename(test::OutputPath(), filename); |
274 return temp_filenames[filename]; | 274 return temp_filenames[filename]; |
275 } | 275 } |
276 | 276 |
277 void ClearTempFiles() { | 277 void ClearTempFiles() { |
278 for (auto& kv : temp_filenames) | 278 for (auto& kv : temp_filenames) |
279 remove(kv.second.c_str()); | 279 remove(kv.second.c_str()); |
280 } | 280 } |
281 | 281 |
282 void OpenFileAndReadMessage(const std::string filename, | 282 void OpenFileAndReadMessage(const std::string filename, |
(...skipping 2337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2620 std::tr1::make_tuple(16000, 16000, 32000, 40), | 2620 std::tr1::make_tuple(16000, 16000, 32000, 40), |
2621 std::tr1::make_tuple(16000, 16000, 16000, 0))); | 2621 std::tr1::make_tuple(16000, 16000, 16000, 0))); |
2622 #endif | 2622 #endif |
2623 | 2623 |
2624 // TODO(henrike): re-implement functionality lost when removing the old main | 2624 // TODO(henrike): re-implement functionality lost when removing the old main |
2625 // function. See | 2625 // function. See |
2626 // https://code.google.com/p/webrtc/issues/detail?id=1981 | 2626 // https://code.google.com/p/webrtc/issues/detail?id=1981 |
2627 | 2627 |
2628 } // namespace | 2628 } // namespace |
2629 } // namespace webrtc | 2629 } // namespace webrtc |
OLD | NEW |