2 Copyright (C) 2011 Tim Mayberry
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2 of the License, or (at your option)
9 This program is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 675 Mass Ave, Cambridge, MA 02139, USA.
21 #include <glibmm/fileutils.h>
22 #include <glibmm/miscutils.h>
24 #include "test_common.h"
31 #ifdef PLATFORM_WINDOWS
32 std::string wsp(g_win32_get_package_installation_directory_of_module(NULL));
33 return Glib::build_filename (wsp, "ardour_testdata");
35 return Glib::getenv("ARDOUR_TEST_PATH");
40 new_test_output_dir (std::string prefix)
42 std::string tmp_dir = Glib::build_filename (g_get_tmp_dir(), "ardour_test");
44 std::string new_test_dir;
48 oss << g_random_int ();
50 new_test_dir = Glib::build_filename (tmp_dir, dir_name);
51 if (Glib::file_test (new_test_dir, Glib::FILE_TEST_EXISTS)) continue;
52 } while (g_mkdir_with_parents (new_test_dir.c_str(), 0755) != 0);
57 get_test_sample_rate ()