mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-21 14:16:31 +01:00
more SAE + gtkosx changes - try to find jackd in the bundle; hard code SAE session params
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2305 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e96e4bacbe
commit
8b4232bb56
4 changed files with 102 additions and 48 deletions
|
|
@ -2086,43 +2086,59 @@ ARDOUR_UI::new_session (Glib::ustring predetermined_path, bool have_engine)
|
|||
load_session (session_path, session_name, &template_name);
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
uint32_t cchns;
|
||||
uint32_t mchns;
|
||||
AutoConnectOption iconnect;
|
||||
AutoConnectOption oconnect;
|
||||
|
||||
if (new_session_dialog->create_control_bus()) {
|
||||
cchns = (uint32_t) new_session_dialog->control_channel_count();
|
||||
} else {
|
||||
uint32_t nphysin;
|
||||
uint32_t nphysout;
|
||||
|
||||
if (Profile->get_sae()) {
|
||||
|
||||
cchns = 0;
|
||||
}
|
||||
|
||||
if (new_session_dialog->create_master_bus()) {
|
||||
mchns = (uint32_t) new_session_dialog->master_channel_count();
|
||||
} else {
|
||||
mchns = 0;
|
||||
}
|
||||
|
||||
if (new_session_dialog->connect_inputs()) {
|
||||
mchns = 2;
|
||||
iconnect = AutoConnectPhysical;
|
||||
} else {
|
||||
iconnect = AutoConnectOption (0);
|
||||
}
|
||||
|
||||
/// @todo some minor tweaks.
|
||||
|
||||
if (new_session_dialog->connect_outs_to_master()) {
|
||||
oconnect = AutoConnectMaster;
|
||||
} else if (new_session_dialog->connect_outs_to_physical()) {
|
||||
oconnect = AutoConnectPhysical;
|
||||
nphysin = 0; // use all available
|
||||
nphysout = 0; // use all available
|
||||
|
||||
} else {
|
||||
oconnect = AutoConnectOption (0);
|
||||
}
|
||||
|
||||
uint32_t nphysin = (uint32_t) new_session_dialog->input_limit_count();
|
||||
uint32_t nphysout = (uint32_t) new_session_dialog->output_limit_count();
|
||||
|
||||
|
||||
/* get settings from advanced section of NSD */
|
||||
|
||||
if (new_session_dialog->create_control_bus()) {
|
||||
cchns = (uint32_t) new_session_dialog->control_channel_count();
|
||||
} else {
|
||||
cchns = 0;
|
||||
}
|
||||
|
||||
if (new_session_dialog->create_master_bus()) {
|
||||
mchns = (uint32_t) new_session_dialog->master_channel_count();
|
||||
} else {
|
||||
mchns = 0;
|
||||
}
|
||||
|
||||
if (new_session_dialog->connect_inputs()) {
|
||||
iconnect = AutoConnectPhysical;
|
||||
} else {
|
||||
iconnect = AutoConnectOption (0);
|
||||
}
|
||||
|
||||
/// @todo some minor tweaks.
|
||||
|
||||
if (new_session_dialog->connect_outs_to_master()) {
|
||||
oconnect = AutoConnectMaster;
|
||||
} else if (new_session_dialog->connect_outs_to_physical()) {
|
||||
oconnect = AutoConnectPhysical;
|
||||
} else {
|
||||
oconnect = AutoConnectOption (0);
|
||||
}
|
||||
|
||||
nphysin = (uint32_t) new_session_dialog->input_limit_count();
|
||||
nphysout = (uint32_t) new_session_dialog->output_limit_count();
|
||||
}
|
||||
|
||||
if (build_session (session_path,
|
||||
session_name,
|
||||
cchns,
|
||||
|
|
@ -2132,7 +2148,7 @@ ARDOUR_UI::new_session (Glib::ustring predetermined_path, bool have_engine)
|
|||
nphysin,
|
||||
nphysout,
|
||||
engine->frame_rate() * 60 * 5)) {
|
||||
|
||||
|
||||
response = Gtk::RESPONSE_NONE;
|
||||
new_session_dialog->reset ();
|
||||
continue;
|
||||
|
|
@ -2970,6 +2986,7 @@ ARDOUR_UI::setup_profile ()
|
|||
|
||||
if (getenv ("ARDOUR_SAE")) {
|
||||
Profile->set_sae ();
|
||||
Profile->set_single_package ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include <glibmm.h>
|
||||
|
||||
#include <ardour/profile.h>
|
||||
#include <jack/jack.h>
|
||||
|
||||
#include <gtkmm/stock.h>
|
||||
|
|
@ -197,24 +198,7 @@ EngineControl::EngineControl ()
|
|||
|
||||
strings.clear ();
|
||||
|
||||
if (Glib::file_test ("/usr/bin/jackd", FILE_TEST_EXISTS)) {
|
||||
strings.push_back ("/usr/bin/jackd");
|
||||
}
|
||||
if (Glib::file_test ("/usr/local/bin/jackd", FILE_TEST_EXISTS)) {
|
||||
strings.push_back ("/usr/local/bin/jackd");
|
||||
}
|
||||
if (Glib::file_test ("/opt/bin/jackd", FILE_TEST_EXISTS)) {
|
||||
strings.push_back ("/opt/bin/jackd");
|
||||
}
|
||||
if (Glib::file_test ("/usr/bin/jackdmp", FILE_TEST_EXISTS)) {
|
||||
strings.push_back ("/usr/bin/jackd");
|
||||
}
|
||||
if (Glib::file_test ("/usr/local/bin/jackdmp", FILE_TEST_EXISTS)) {
|
||||
strings.push_back ("/usr/local/bin/jackd");
|
||||
}
|
||||
if (Glib::file_test ("/opt/bin/jackdmp", FILE_TEST_EXISTS)) {
|
||||
strings.push_back ("/opt/bin/jackd");
|
||||
}
|
||||
find_jack_servers (strings);
|
||||
|
||||
if (strings.empty()) {
|
||||
fatal << _("No JACK server found anywhere on this system. Please install JACK and restart") << endmsg;
|
||||
|
|
@ -587,3 +571,51 @@ EngineControl::audio_mode_changed ()
|
|||
output_device_combo.set_sensitive (true);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EngineControl::find_jack_servers (vector<string>& strings)
|
||||
{
|
||||
#ifdef __APPLE
|
||||
if (Profile->get_single_package()) {
|
||||
|
||||
/* this magic lets us finds the path to the OSX bundle, and then
|
||||
we infer JACK's location from there
|
||||
*/
|
||||
|
||||
CFURLRef pluginRef = CFBundleCopyBundleURL(CFBundleGetMainBundle());
|
||||
CFStringRef macPath = CFURLCopyFileSystemPath(pluginRef,
|
||||
kCFURLPOSIXPathStyle);
|
||||
std::string path = CFStringGetCStringPtr(macPath,
|
||||
CFStringGetSystemEncoding());
|
||||
CFRelease(pluginRef);
|
||||
CFRelease(macPath);
|
||||
|
||||
path += '/jackd';
|
||||
|
||||
if (Glib::file_test (path, FILE_TEST_EXISTS)) {
|
||||
strings.push_back ();
|
||||
} else {
|
||||
warning << _("JACK appears to be missing from the Ardour bundle") << endmsg;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (Glib::file_test ("/usr/bin/jackd", FILE_TEST_EXISTS)) {
|
||||
strings.push_back ("/usr/bin/jackd");
|
||||
}
|
||||
if (Glib::file_test ("/usr/local/bin/jackd", FILE_TEST_EXISTS)) {
|
||||
strings.push_back ("/usr/local/bin/jackd");
|
||||
}
|
||||
if (Glib::file_test ("/opt/bin/jackd", FILE_TEST_EXISTS)) {
|
||||
strings.push_back ("/opt/bin/jackd");
|
||||
}
|
||||
if (Glib::file_test ("/usr/bin/jackdmp", FILE_TEST_EXISTS)) {
|
||||
strings.push_back ("/usr/bin/jackd");
|
||||
}
|
||||
if (Glib::file_test ("/usr/local/bin/jackdmp", FILE_TEST_EXISTS)) {
|
||||
strings.push_back ("/usr/local/bin/jackd");
|
||||
}
|
||||
if (Glib::file_test ("/opt/bin/jackdmp", FILE_TEST_EXISTS)) {
|
||||
strings.push_back ("/opt/bin/jackd");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ class EngineControl : public Gtk::VBox {
|
|||
void redisplay_latency ();
|
||||
uint32_t get_rate();
|
||||
void audio_mode_changed ();
|
||||
void find_jack_servers (std::vector<std::string>&);
|
||||
};
|
||||
|
||||
#endif /* __gtk2_ardour_engine_dialog_h__ */
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ class RuntimeProfile {
|
|||
enum Element {
|
||||
SmallScreen,
|
||||
SAE,
|
||||
SinglePackage,
|
||||
LastElement
|
||||
};
|
||||
|
||||
|
|
@ -42,6 +43,9 @@ class RuntimeProfile {
|
|||
void set_sae () { bits[SAE] = true; }
|
||||
bool get_sae () const { return bits[SAE]; }
|
||||
|
||||
void set_single_package () { bits[SinglePackage] = true; }
|
||||
bool get_single_package () const { return bits[SinglePackage]; }
|
||||
|
||||
private:
|
||||
boost::dynamic_bitset<uint64_t> bits;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue