diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-08-05 12:51:51 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-08-05 12:51:51 -0400 |
commit | a66e3859e1415cb992320089004eb8a9903cf721 (patch) | |
tree | f93b5f05ccf26e6b91ed0a2b99a5d8603cc73131 /libs | |
parent | 7218bd91de3b69032e515617449702f368db59d2 (diff) |
can now start JACK based on config dialog
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/jack_audiobackend.cc | 15 | ||||
-rw-r--r-- | libs/ardour/jack_utils.cc | 8 |
2 files changed, 12 insertions, 11 deletions
diff --git a/libs/ardour/jack_audiobackend.cc b/libs/ardour/jack_audiobackend.cc index 97031cfaff..8ab8428555 100644 --- a/libs/ardour/jack_audiobackend.cc +++ b/libs/ardour/jack_audiobackend.cc @@ -197,13 +197,13 @@ JACKAudioBackend::set_device_name (const string& dev) int JACKAudioBackend::set_sample_rate (float sr) { - GET_PRIVATE_JACK_POINTER_RET (_priv_jack, -1); - if (!connected()) { _target_sample_rate = sr; return 0; } + GET_PRIVATE_JACK_POINTER_RET (_priv_jack, -1); + if (sr == jack_get_sample_rate (_priv_jack)) { return 0; } @@ -214,13 +214,13 @@ JACKAudioBackend::set_sample_rate (float sr) int JACKAudioBackend::set_buffer_size (uint32_t nframes) { - GET_PRIVATE_JACK_POINTER_RET (_priv_jack, -1); - if (!connected()) { _target_buffer_size = nframes; return 0; } + GET_PRIVATE_JACK_POINTER_RET (_priv_jack, -1); + if (nframes == jack_get_buffer_size (_priv_jack)) { return 0; } @@ -384,6 +384,8 @@ JACKAudioBackend::setup_jack_startup_command () JackCommandLineOptions options; + get_jack_default_server_path (options.server_path); + options.driver = _target_driver; options.samplerate = _target_sample_rate; options.period_size = _target_buffer_size; options.num_periods = 2; @@ -394,7 +396,9 @@ JACKAudioBackend::setup_jack_startup_command () if (_target_sample_format == FormatInt16) { options.force16_bit = _target_sample_format; } - + options.realtime = true; + options.ports_max = 2048; + /* this must always be true for any server instance we start ourselves */ @@ -422,7 +426,6 @@ JACKAudioBackend::start () setup_jack_startup_command (); } - std::cerr << "Open JACK connection\n"; _jack_connection->open (); } diff --git a/libs/ardour/jack_utils.cc b/libs/ardour/jack_utils.cc index 606b71603a..ea1aea2623 100644 --- a/libs/ardour/jack_utils.cc +++ b/libs/ardour/jack_utils.cc @@ -667,7 +667,7 @@ ARDOUR::JackCommandLineOptions::JackCommandLineOptions () , ports_max(128) , realtime(true) , priority(0) - , unlock_gui_libs(true) + , unlock_gui_libs(false) , verbose(false) , temporary(true) , driver() @@ -759,14 +759,12 @@ ARDOUR::get_jack_command_line_string (const JackCommandLineOptions& options, str string command_line_output_device_name; if (!get_jack_command_line_audio_device_name (options.driver, - options.input_device, command_line_input_device_name)) - { + options.input_device, command_line_input_device_name)) { return false; } if (!get_jack_command_line_audio_device_name (options.driver, - options.output_device, command_line_output_device_name)) - { + options.output_device, command_line_output_device_name)) { return false; } |