| 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 bool enable_agc = false; | 222 bool enable_agc = false; |
| 223 bool enable_cng = false; | 223 bool enable_cng = false; |
| 224 bool enable_ns = false; | 224 bool enable_ns = false; |
| 225 bool typing_detection = false; | 225 bool typing_detection = false; |
| 226 bool muted = false; | 226 bool muted = false; |
| 227 bool opus_stereo = false; | 227 bool opus_stereo = false; |
| 228 bool opus_dtx = false; | 228 bool opus_dtx = false; |
| 229 bool experimental_ns_enabled = false; | 229 bool experimental_ns_enabled = false; |
| 230 bool debug_recording_started = false; | 230 bool debug_recording_started = false; |
| 231 | 231 |
| 232 #if defined(WEBRTC_ANDROID) | 232 const std::string audio_filename = |
| 233 std::string resource_path = "/sdcard/"; | 233 webrtc::test::ResourcePath("voice_engine/audio_long16", "pcm"); |
| 234 #else | |
| 235 std::string resource_path = webrtc::test::ProjectRootPath(); | |
| 236 if (resource_path == webrtc::test::kCannotFindProjectRootDir) { | |
| 237 printf("*** Unable to get project root directory. " | |
| 238 "File playing may fail. ***\n"); | |
| 239 // Fall back to the current directory. | |
| 240 resource_path = "./"; | |
| 241 } else { | |
| 242 resource_path += "data/voice_engine/"; | |
| 243 } | |
| 244 #endif | |
| 245 const std::string audio_filename = resource_path + "audio_long16.pcm"; | |
| 246 | 234 |
| 247 const std::string play_filename = out_path + "recorded_playout.pcm"; | 235 const std::string play_filename = out_path + "recorded_playout.pcm"; |
| 248 const std::string mic_filename = out_path + "recorded_mic.pcm"; | 236 const std::string mic_filename = out_path + "recorded_mic.pcm"; |
| 249 | 237 |
| 250 chan = base1->CreateChannel(); | 238 chan = base1->CreateChannel(); |
| 251 if (chan < 0) { | 239 if (chan < 0) { |
| 252 printf("************ Error code = %i\n", base1->LastError()); | 240 printf("************ Error code = %i\n", base1->LastError()); |
| 253 fflush(NULL); | 241 fflush(NULL); |
| 254 } | 242 } |
| 255 | 243 |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 | 795 |
| 808 printf("Delete channels \n"); | 796 printf("Delete channels \n"); |
| 809 res = base1->DeleteChannel(chan); | 797 res = base1->DeleteChannel(chan); |
| 810 VALIDATE; | 798 VALIDATE; |
| 811 | 799 |
| 812 for (int i = 0; i < kMaxNumChannels; ++i) { | 800 for (int i = 0; i < kMaxNumChannels; ++i) { |
| 813 res = base1->DeleteChannel(channels[i]); | 801 res = base1->DeleteChannel(channels[i]); |
| 814 VALIDATE; | 802 VALIDATE; |
| 815 } | 803 } |
| 816 } | 804 } |
| OLD | NEW |