1 /*
2  *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3  *
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
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #include "webrtc/voice_engine/test/auto_test/resource_manager.h"
12 
13 #include "webrtc/test/testsupport/fileutils.h"
14 
ResourceManager()15 ResourceManager::ResourceManager() {
16   std::string filename = "audio_long16.pcm";
17 #if defined(WEBRTC_ANDROID)
18   long_audio_file_path_ = "/sdcard/" + filename;
19 #else
20   std::string resource_path = webrtc::test::ProjectRootPath();
21   if (resource_path == webrtc::test::kCannotFindProjectRootDir) {
22     long_audio_file_path_ = "";
23   } else {
24     long_audio_file_path_ =
25         resource_path + "data/voice_engine/" + filename;
26   }
27 #endif
28 }
29