2011-12-19 09:36:03 +00:00
|
|
|
/*
|
2012-05-23 15:39:01 +00:00
|
|
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
2011-12-19 09:36:03 +00:00
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2013-05-21 13:52:32 +00:00
|
|
|
#include "webrtc/voice_engine/test/auto_test/resource_manager.h"
|
2011-12-19 09:36:03 +00:00
|
|
|
|
2013-05-21 13:52:32 +00:00
|
|
|
#include "webrtc/test/testsupport/fileutils.h"
|
2011-12-19 09:36:03 +00:00
|
|
|
|
|
|
|
|
ResourceManager::ResourceManager() {
|
|
|
|
|
std::string filename = "audio_long16.pcm";
|
|
|
|
|
#if defined(WEBRTC_ANDROID)
|
|
|
|
|
long_audio_file_path_ = "/sdcard/" + filename;
|
|
|
|
|
#else
|
|
|
|
|
std::string resource_path = webrtc::test::ProjectRootPath();
|
|
|
|
|
if (resource_path == webrtc::test::kCannotFindProjectRootDir) {
|
|
|
|
|
long_audio_file_path_ = "";
|
|
|
|
|
} else {
|
|
|
|
|
long_audio_file_path_ =
|
2012-05-23 15:39:01 +00:00
|
|
|
resource_path + "data/voice_engine/" + filename;
|
2011-12-19 09:36:03 +00:00
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
}
|