4 #ifdef PLATFORM_WINDOWS
8 #include <glibmm/miscutils.h>
22 vector<string> driver_names;
26 CPPUNIT_ASSERT(!driver_names.empty());
29 cout <<
"Number of possible JACK Audio drivers found on this system: " << driver_names.size () << endl;
31 for (vector<string>::const_iterator i = driver_names.begin(); i != driver_names.end(); ++i) {
32 cout <<
"JACK Audio driver found: " << *i << endl;
35 string default_audio_driver;
38 cout <<
"The default audio driver on this system is: " << default_audio_driver << endl;
44 CPPUNIT_ASSERT(!driver_names.empty());
46 cout <<
"Number of possible JACK MIDI drivers found on this system for default audio driver: " << driver_names.size () << endl;
48 for (vector<string>::const_iterator i = driver_names.begin(); i != driver_names.end(); ++i) {
49 cout <<
"JACK MIDI driver found: " << *i << endl;
52 string default_midi_driver;
55 cout <<
"The default midi driver on this system is: " << default_midi_driver << endl;
62 for (vector<string>::const_iterator i = devices.begin(); i != devices.end();) {
64 if (++i != devices.end()) str +=
", ";
72 vector<string> driver_names;
76 CPPUNIT_ASSERT(!driver_names.empty());
80 for (vector<string>::const_iterator i = driver_names.begin(); i != driver_names.end(); ++i) {
82 cout <<
"JACK Audio driver found: " << *i <<
" with devices: " << devices << endl;
89 vector<string> samplerates;
93 cout <<
"Number of possible Samplerates supported by JACK: " << samplerates.size () << endl;
95 for (vector<string>::const_iterator i = samplerates.begin(); i != samplerates.end(); ++i) {
96 cout <<
"Samplerate: " << *i << endl;
103 vector<string> period_sizes;
107 cout <<
"Number of possible Period sizes supported by JACK: " << period_sizes.size () << endl;
109 for (vector<string>::const_iterator i = period_sizes.begin(); i != period_sizes.end(); ++i) {
110 cout <<
"Period size: " << *i << endl;
117 vector<string> driver_names;
121 CPPUNIT_ASSERT(!driver_names.empty());
125 for (vector<string>::const_iterator i = driver_names.begin(); i != driver_names.end(); ++i) {
126 vector<string> dither_modes;
129 cout <<
"Number of possible Dither Modes supported by JACK driver " << *i <<
130 ": " << dither_modes.size () << endl;
131 for (vector<string>::const_iterator j = dither_modes.begin(); j != dither_modes.end(); ++j) {
132 cout <<
"Dither Mode: " << *j << endl;
144 cout <<
"Jack server running " << endl;
146 cout <<
"Jack server not running " << endl;
155 bool path_env_set =
false;
157 string path_env = Glib::getenv (
"PATH", path_env_set);
160 cout <<
"PATH env set to: " << path_env << endl;
162 cout <<
"PATH env not set" << endl;
164 vector<string> server_dirs;
168 path_env_set =
false;
170 path_env = Glib::getenv (
"PATH", path_env_set);
172 CPPUNIT_ASSERT (path_env_set);
174 cout <<
"After set_jack_path_env PATH env set to: " << path_env << endl;
182 vector<std::string> server_dirs;
186 cout <<
"Number of Directories that may contain JACK servers: " << server_dirs.size () << endl;
188 for (vector<std::string>::const_iterator i = server_dirs.begin(); i != server_dirs.end(); ++i) {
189 cout <<
"JACK server directory path: " << *i << endl;
192 vector<string> server_names;
196 cout <<
"Number of possible JACK server names on this system: " << server_names.size () << endl;
198 for (vector<string>::const_iterator i = server_names.begin(); i != server_names.end(); ++i) {
199 cout <<
"JACK server name: " << *i << endl;
202 vector<std::string> server_paths;
206 cout <<
"Number of JACK servers on this system: " << server_paths.size () << endl;
208 for (vector<std::string>::const_iterator i = server_paths.begin(); i != server_paths.end(); ++i) {
209 cout <<
"JACK server path: " << *i << endl;
212 vector<std::string> server_paths2;
216 CPPUNIT_ASSERT (server_paths.size () == server_paths2.size ());
218 std::string default_server_path;
222 cout <<
"The default JACK server on this system: " << default_server_path << endl;
242 if (!devices.empty()) {
246 cout <<
"No audio devices available using default JACK driver using Dummy driver" << endl;
249 CPPUNIT_ASSERT (!devices.empty ());
271 cout <<
"Jack server config file path: " << config_path << endl;
273 std::string command_line;
289 cout <<
"Default JACK command line: " << command_line << endl;
void get_jack_default_audio_driver_name(std::string &driver_name)
void get_jack_audio_driver_names(std::vector< std::string > &driver_names)
bool get_jack_default_server_path(std::string &server_path)
void set_path_env_for_jack_autostart(const std::vector< std::string > &)
bool get_jack_command_line_string(const JackCommandLineOptions &options, std::string &command_line)
void get_jack_period_size_strings(std::vector< std::string > &samplerates)
std::string output_device
CPPUNIT_TEST_SUITE_REGISTRATION(JackUtilsTest)
void get_jack_midi_system_names(const std::string &driver, std::vector< std::string > &driver_names)
const char *const dummy_driver_name
void get_jack_sample_rate_strings(std::vector< std::string > &sample_rates)
std::string get_jack_server_user_config_file_path()
string devices_string(const vector< string > &devices)
void get_jack_dither_mode_strings(const std::string &driver, std::vector< std::string > &dither_modes)
bool get_jack_server_application_names(std::vector< std::string > &server_names)
bool get_jack_server_paths(const std::vector< std::string > &server_dir_paths, const std::vector< std::string > &server_names, std::vector< std::string > &server_paths)
bool get_default_jack_command_line(std::string &command_line)
void get_jack_default_midi_system_name(const std::string &driver_name, std::string &midi_system)
bool write_jack_config_file(const std::string &config_file_path, const std::string &command_line)
bool get_jack_server_dir_paths(std::vector< std::string > &server_dir_paths)
bool get_jack_device_names_for_audio_driver(const std::string &driver, device_map_t &devices)
bool jack_server_running()
void test_connect_server()
void test_set_jack_path_env()