mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-21 22:26:29 +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
|
|
@ -2091,6 +2091,21 @@ ARDOUR_UI::new_session (Glib::ustring predetermined_path, bool have_engine)
|
||||||
uint32_t mchns;
|
uint32_t mchns;
|
||||||
AutoConnectOption iconnect;
|
AutoConnectOption iconnect;
|
||||||
AutoConnectOption oconnect;
|
AutoConnectOption oconnect;
|
||||||
|
uint32_t nphysin;
|
||||||
|
uint32_t nphysout;
|
||||||
|
|
||||||
|
if (Profile->get_sae()) {
|
||||||
|
|
||||||
|
cchns = 0;
|
||||||
|
mchns = 2;
|
||||||
|
iconnect = AutoConnectPhysical;
|
||||||
|
oconnect = AutoConnectMaster;
|
||||||
|
nphysin = 0; // use all available
|
||||||
|
nphysout = 0; // use all available
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
/* get settings from advanced section of NSD */
|
||||||
|
|
||||||
if (new_session_dialog->create_control_bus()) {
|
if (new_session_dialog->create_control_bus()) {
|
||||||
cchns = (uint32_t) new_session_dialog->control_channel_count();
|
cchns = (uint32_t) new_session_dialog->control_channel_count();
|
||||||
|
|
@ -2120,8 +2135,9 @@ ARDOUR_UI::new_session (Glib::ustring predetermined_path, bool have_engine)
|
||||||
oconnect = AutoConnectOption (0);
|
oconnect = AutoConnectOption (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t nphysin = (uint32_t) new_session_dialog->input_limit_count();
|
nphysin = (uint32_t) new_session_dialog->input_limit_count();
|
||||||
uint32_t nphysout = (uint32_t) new_session_dialog->output_limit_count();
|
nphysout = (uint32_t) new_session_dialog->output_limit_count();
|
||||||
|
}
|
||||||
|
|
||||||
if (build_session (session_path,
|
if (build_session (session_path,
|
||||||
session_name,
|
session_name,
|
||||||
|
|
@ -2970,6 +2986,7 @@ ARDOUR_UI::setup_profile ()
|
||||||
|
|
||||||
if (getenv ("ARDOUR_SAE")) {
|
if (getenv ("ARDOUR_SAE")) {
|
||||||
Profile->set_sae ();
|
Profile->set_sae ();
|
||||||
|
Profile->set_single_package ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include <glibmm.h>
|
#include <glibmm.h>
|
||||||
|
|
||||||
|
#include <ardour/profile.h>
|
||||||
#include <jack/jack.h>
|
#include <jack/jack.h>
|
||||||
|
|
||||||
#include <gtkmm/stock.h>
|
#include <gtkmm/stock.h>
|
||||||
|
|
@ -197,24 +198,7 @@ EngineControl::EngineControl ()
|
||||||
|
|
||||||
strings.clear ();
|
strings.clear ();
|
||||||
|
|
||||||
if (Glib::file_test ("/usr/bin/jackd", FILE_TEST_EXISTS)) {
|
find_jack_servers (strings);
|
||||||
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");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strings.empty()) {
|
if (strings.empty()) {
|
||||||
fatal << _("No JACK server found anywhere on this system. Please install JACK and restart") << endmsg;
|
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);
|
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 ();
|
void redisplay_latency ();
|
||||||
uint32_t get_rate();
|
uint32_t get_rate();
|
||||||
void audio_mode_changed ();
|
void audio_mode_changed ();
|
||||||
|
void find_jack_servers (std::vector<std::string>&);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __gtk2_ardour_engine_dialog_h__ */
|
#endif /* __gtk2_ardour_engine_dialog_h__ */
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ class RuntimeProfile {
|
||||||
enum Element {
|
enum Element {
|
||||||
SmallScreen,
|
SmallScreen,
|
||||||
SAE,
|
SAE,
|
||||||
|
SinglePackage,
|
||||||
LastElement
|
LastElement
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -42,6 +43,9 @@ class RuntimeProfile {
|
||||||
void set_sae () { bits[SAE] = true; }
|
void set_sae () { bits[SAE] = true; }
|
||||||
bool get_sae () const { return bits[SAE]; }
|
bool get_sae () const { return bits[SAE]; }
|
||||||
|
|
||||||
|
void set_single_package () { bits[SinglePackage] = true; }
|
||||||
|
bool get_single_package () const { return bits[SinglePackage]; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
boost::dynamic_bitset<uint64_t> bits;
|
boost::dynamic_bitset<uint64_t> bits;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue