summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-09-25 13:02:31 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2019-09-25 13:02:31 -0600
commit468731c14b9bde769b79ae1a88277701f3f9d068 (patch)
treebd366db36c59109b3d2023826d644ff57c1da394 /libs/ardour
parent5ec5bc4523e5c0fd998a6a133c6a03ab1475f063 (diff)
goodbye Profile->...trx
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/profile.h4
-rw-r--r--libs/ardour/audio_track.cc8
-rw-r--r--libs/ardour/export_profile_manager.cc8
-rw-r--r--libs/ardour/io.cc5
-rw-r--r--libs/ardour/port_manager.cc10
-rw-r--r--libs/ardour/session.cc80
-rw-r--r--libs/ardour/session_midi.cc13
-rw-r--r--libs/ardour/session_state.cc76
-rw-r--r--libs/ardour/session_transport.cc2
-rw-r--r--libs/ardour/source.cc5
-rw-r--r--libs/ardour/track.cc2
11 files changed, 40 insertions, 173 deletions
diff --git a/libs/ardour/ardour/profile.h b/libs/ardour/ardour/profile.h
index 1bbc78d910..a3d2f9eb94 100644
--- a/libs/ardour/ardour/profile.h
+++ b/libs/ardour/ardour/profile.h
@@ -31,7 +31,6 @@ public:
enum Element {
SmallScreen,
SinglePackage,
- Trx,
Mixbus,
LastElement,
};
@@ -42,9 +41,6 @@ public:
void set_small_screen() { bits[SmallScreen] = true; }
bool get_small_screen() const { return bits[SmallScreen]; }
- bool get_trx() const { return bits[Trx]; }
- void set_trx() { bits[Trx] = true; }
-
bool get_mixbus() const { return bits[Mixbus]; }
void set_mixbus() { bits[Mixbus] = true; }
diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc
index 2aee141ccf..167f6de6f8 100644
--- a/libs/ardour/audio_track.cc
+++ b/libs/ardour/audio_track.cc
@@ -144,14 +144,6 @@ AudioTrack::set_state (const XMLNode& node, int version)
_mode = Normal;
}
- if (Profile->get_trx() && _mode == Destructive) {
- /* Tracks does not support destructive tracks and trying to
- handle it as a normal track would be wrong.
- */
- error << string_compose (_("%1: this session uses destructive tracks, which are not supported"), PROGRAM_NAME) << endmsg;
- return -1;
- }
-
if (Track::set_state (node, version)) {
return -1;
}
diff --git a/libs/ardour/export_profile_manager.cc b/libs/ardour/export_profile_manager.cc
index d945c6f0d8..ff9cb075ad 100644
--- a/libs/ardour/export_profile_manager.cc
+++ b/libs/ardour/export_profile_manager.cc
@@ -408,14 +408,10 @@ ExportProfileManager::init_timespans (XMLNodeList nodes)
// Add session as default selection
Location * session_range;
- if (Profile->get_trx()) {
- session_range = (session.get_play_loop () ? session.locations()->auto_loop_location () : session.locations()->session_range_location());
- } else {
- session_range = session.locations()->session_range_location();
+ if ((session_range = session.locations()->session_range_location()) != 0) {
+ return false;
}
- if (!session_range) { return false; }
-
ExportTimespanPtr timespan = handler->add_timespan();
timespan->set_name (session_range->name());
timespan->set_range_id (session_range->id().to_s());
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc
index da7aab3702..1cf8b4d401 100644
--- a/libs/ardour/io.cc
+++ b/libs/ardour/io.cc
@@ -704,10 +704,7 @@ IO::connecting_became_legal ()
connection_legal_c.disconnect ();
- // it's not required for TracksLive, as long as TracksLive's session does all the connections when it's being loaded
- if (!Profile->get_trx() ) {
- ret = make_connections (*pending_state_node, pending_state_node_version, pending_state_node_in);
- }
+ ret = make_connections (*pending_state_node, pending_state_node_version, pending_state_node_in);
delete pending_state_node;
pending_state_node = 0;
diff --git a/libs/ardour/port_manager.cc b/libs/ardour/port_manager.cc
index 3278736a1e..b329aeca11 100644
--- a/libs/ardour/port_manager.cc
+++ b/libs/ardour/port_manager.cc
@@ -642,14 +642,12 @@ PortManager::reconnect_ports ()
{
boost::shared_ptr<Ports> p = ports.reader ();
- if (!Profile->get_trx()) {
- /* re-establish connections */
+ /* re-establish connections */
- DEBUG_TRACE (DEBUG::Ports, string_compose ("reconnect %1 ports\n", p->size()));
+ DEBUG_TRACE (DEBUG::Ports, string_compose ("reconnect %1 ports\n", p->size()));
- for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
- i->second->reconnect ();
- }
+ for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
+ i->second->reconnect ();
}
return 0;
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index af13f7bfc0..2848cd682a 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -949,12 +949,6 @@ Session::auto_connect_master_bus ()
return;
}
- // Waves Tracks: Do not connect master bas for Tracks if AutoConnectMaster option is not set
- // In this case it means "Multi Out" output mode
- if (ARDOUR::Profile->get_trx() && !(Config->get_output_auto_connect() & AutoConnectMaster) ) {
- return;
- }
-
/* if requested auto-connect the outputs to the first N physical ports.
*/
@@ -985,7 +979,7 @@ Session::auto_connect_master_bus ()
void
Session::remove_monitor_section ()
{
- if (!_monitor_out || Profile->get_trx()) {
+ if (!_monitor_out) {
return;
}
@@ -1056,7 +1050,7 @@ Session::add_monitor_section ()
return;
}
- if (_monitor_out || !_master_out || Profile->get_trx()) {
+ if (_monitor_out || !_master_out) {
return;
}
@@ -1208,7 +1202,7 @@ Session::reset_monitor_section ()
{
/* Process lock should be held by the caller.*/
- if (!_monitor_out || Profile->get_trx()) {
+ if (!_monitor_out) {
return;
}
@@ -2342,11 +2336,7 @@ Session::default_track_name_pattern (DataType t)
{
switch (t) {
case DataType::AUDIO:
- if (Profile->get_trx()) {
- return _("Track ");
- } else {
- return _("Audio ");
- }
+ return _("Audio ");
break;
case DataType::MIDI:
@@ -2435,11 +2425,7 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, bool s
failed:
if (!new_routes.empty()) {
StateProtector sp (this);
- if (Profile->get_trx()) {
- add_routes (new_routes, false, false, false, order);
- } else {
- add_routes (new_routes, true, true, false, order);
- }
+ add_routes (new_routes, true, true, false, order);
if (instrument) {
for (RouteList::iterator r = new_routes.begin(); r != new_routes.end(); ++r) {
@@ -2691,20 +2677,6 @@ Session::new_audio_track (int input_channels, int output_channels, RouteGroup* r
track->set_strict_io (true);
}
- if (ARDOUR::Profile->get_trx ()) {
- // TRACKS considers it's not a USE CASE, it's
- // a piece of behavior of the session model:
- //
- // Gain for a newly created route depends on
- // the current output_auto_connect mode:
- //
- // 0 for Stereo Out mode
- // 0 Multi Out mode
- if (Config->get_output_auto_connect() & AutoConnectMaster) {
- track->gain_control()->set_value (dB_to_coefficient (0), Controllable::NoGroup);
- }
- }
-
BOOST_MARK_TRACK (track);
{
@@ -2752,11 +2724,7 @@ Session::new_audio_track (int input_channels, int output_channels, RouteGroup* r
failed:
if (!new_routes.empty()) {
StateProtector sp (this);
- if (Profile->get_trx()) {
- add_routes (new_routes, false, false, false, order);
- } else {
- add_routes (new_routes, true, true, false, order);
- }
+ add_routes (new_routes, true, true, false, order);
}
return ret;
@@ -2839,9 +2807,8 @@ Session::new_audio_route (int input_channels, int output_channels, RouteGroup* r
failure:
if (!ret.empty()) {
StateProtector sp (this);
- if (Profile->get_trx()) {
- add_routes (ret, false, false, false, order);
- } else if (flags == PresentationInfo::FoldbackBus) {
+
+ if (flags == PresentationInfo::FoldbackBus) {
add_routes (ret, false, false, true, order); // no autoconnect
} else {
add_routes (ret, false, true, true, order); // autoconnect // outputs only
@@ -3081,11 +3048,8 @@ Session::new_route_from_template (uint32_t how_many, PresentationInfo::order_t i
out:
if (!ret.empty()) {
StateProtector sp (this);
- if (Profile->get_trx()) {
- add_routes (ret, false, false, false, insert_at);
- } else {
- add_routes (ret, true, true, false, insert_at);
- }
+
+ add_routes (ret, true, true, false, insert_at);
}
IO::enable_connecting ();
@@ -4746,17 +4710,11 @@ Session::format_audio_source_name (const string& legalized_base, uint32_t nchan,
ostringstream sstr;
const string ext = native_header_format_extension (config.get_native_file_header_format(), DataType::AUDIO);
- if (Profile->get_trx() && destructive) {
- sstr << 'T';
- sstr << setfill ('0') << setw (4) << cnt;
- sstr << legalized_base;
- } else {
- sstr << legalized_base;
+ sstr << legalized_base;
- if (take_required || related_exists) {
- sstr << '-';
- sstr << cnt;
- }
+ if (take_required || related_exists) {
+ sstr << '-';
+ sstr << cnt;
}
if (nchan == 2) {
@@ -6787,16 +6745,6 @@ Session::auto_connect (const AutoConnectRequest& ar)
for (uint32_t i = ar.output_start.get(*t); i < route->n_outputs().get(*t); ++i) {
string port;
- /* Waves Tracks:
- * do not create new connections if we reached the limit of physical outputs
- * in Multi Out mode
- */
- if (!(Config->get_output_auto_connect() & AutoConnectMaster) &&
- ARDOUR::Profile->get_trx () &&
- ar.output_offset.get(*t) == nphysical_out ) {
- break;
- }
-
if ((*t) == DataType::MIDI && (Config->get_output_auto_connect() & AutoConnectPhysical)) {
port = physoutputs[(out_offset.get(*t) + i) % nphysical_out];
} else if ((*t) == DataType::AUDIO && (Config->get_output_auto_connect() & AutoConnectMaster)) {
diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc
index 6de0b7058c..a305cd7c66 100644
--- a/libs/ardour/session_midi.cc
+++ b/libs/ardour/session_midi.cc
@@ -136,19 +136,6 @@ Session::mmc_record_pause (MIDI::MachineControl &/*mmc*/)
void
Session::mmc_record_strobe (MIDI::MachineControl &/*mmc*/)
{
- if (Profile->get_trx()) {
-
- /* In Tracks Live, there is no concept of punch, so we just
- treat RecordStrobe like RecordPause. This violates the MMC
- specification.
- */
-
- if (Config->get_mmc_control()) {
- maybe_enable_record();
- }
- return;
- }
-
if (!Config->get_mmc_control() || (_step_editors > 0)) {
return;
}
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index ed0ab27e06..c9c61ba9d5 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -169,18 +169,8 @@ Session::pre_engine_init (string fullpath)
_path = canonical_path(fullpath);
/* is it new ? */
- if (Profile->get_trx() ) {
- // Waves TracksLive has a usecase of session replacement with a new one.
- // We should check session state file (<session_name>.ardour) existance
- // to determine if the session is new or not
- string full_session_name = Glib::build_filename( fullpath, _name );
- full_session_name += statefile_suffix;
-
- _is_new = !Glib::file_test (full_session_name, Glib::FileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR));
- } else {
- _is_new = !Glib::file_test (_path, Glib::FileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR));
- }
+ _is_new = !Glib::file_test (_path, Glib::FileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR));
/* finish initialization that can't be done in a normal C++ constructor
definition.
@@ -597,7 +587,7 @@ Session::create (const string& session_template, BusProfile* bus_profile)
_writable = exists_and_writable (_path);
if (!session_template.empty()) {
- string in_path = (ARDOUR::Profile->get_trx () ? session_template : session_template_dir_to_file (session_template));
+ string in_path = session_template_dir_to_file (session_template);
FILE* in = g_fopen (in_path.c_str(), "rb");
@@ -640,11 +630,9 @@ Session::create (const string& session_template, BusProfile* bus_profile)
_is_new = false;
- if (!ARDOUR::Profile->get_trx()) {
- /* Copy plugin state files from template to new session */
- std::string template_plugins = Glib::build_filename (session_template, X_("plugins"));
- copy_recurse (template_plugins, plugins_dir ());
- }
+ /* Copy plugin state files from template to new session */
+ std::string template_plugins = Glib::build_filename (session_template, X_("plugins"));
+ copy_recurse (template_plugins, plugins_dir ());
return 0;
@@ -663,22 +651,6 @@ Session::create (const string& session_template, BusProfile* bus_profile)
}
- if (Profile->get_trx()) {
-
- /* set initial start + end point : ARDOUR::Session::session_end_shift long.
- * Remember that this is a brand new session. Sessions
- * loaded from saved state will get this range from the saved state.
- */
-
- set_session_range_location (0, 0);
-
- /* Initial loop location, from absolute zero, length 10 seconds */
-
- Location* loc = new Location (*this, 0, 10.0 * _engine.sample_rate(), _("Loop"), Location::IsAutoLoop, 0);
- _locations->add (loc, true);
- set_auto_loop_location (loc);
- }
-
_state_of_the_state = Clean;
/* set up Master Out and Monitor Out if necessary */
@@ -1446,14 +1418,6 @@ Session::state (bool save_template, snapshot_t snapshot_type, bool only_used_ass
loc.add (range);
XMLNode& locations_state = loc.get_state();
- if (ARDOUR::Profile->get_trx() && _locations) {
- // For tracks we need stored the Auto Loop Range and all MIDI markers.
- for (Locations::LocationList::const_iterator i = _locations->list ().begin (); i != _locations->list ().end (); ++i) {
- if ((*i)->is_mark () || (*i)->is_auto_loop ()) {
- locations_state.add_child_nocopy ((*i)->get_state ());
- }
- }
- }
node->add_child_nocopy (locations_state);
/* adding a location above will have marked the session
@@ -2531,31 +2495,25 @@ Session::save_template (const string& template_name, const string& description,
template_dir_path = template_name;
}
- if (!ARDOUR::Profile->get_trx()) {
- if (!replace_existing && Glib::file_test (template_dir_path, Glib::FILE_TEST_EXISTS)) {
- warning << string_compose(_("Template \"%1\" already exists - new version not created"),
- template_dir_path) << endmsg;
- return -2;
- }
+ if (!replace_existing && Glib::file_test (template_dir_path, Glib::FILE_TEST_EXISTS)) {
+ warning << string_compose(_("Template \"%1\" already exists - new version not created"),
+ template_dir_path) << endmsg;
+ return -2;
+ }
- if (g_mkdir_with_parents (template_dir_path.c_str(), 0755) != 0) {
- error << string_compose(_("Could not create directory for Session template\"%1\" (%2)"),
- template_dir_path, g_strerror (errno)) << endmsg;
- return -1;
- }
+ if (g_mkdir_with_parents (template_dir_path.c_str(), 0755) != 0) {
+ error << string_compose(_("Could not create directory for Session template\"%1\" (%2)"),
+ template_dir_path, g_strerror (errno)) << endmsg;
+ return -1;
}
/* file to write */
std::string template_file_path;
- if (ARDOUR::Profile->get_trx()) {
- template_file_path = template_name;
+ if (absolute_path) {
+ template_file_path = Glib::build_filename (template_dir_path, Glib::path_get_basename (template_dir_path) + template_suffix);
} else {
- if (absolute_path) {
- template_file_path = Glib::build_filename (template_dir_path, Glib::path_get_basename (template_dir_path) + template_suffix);
- } else {
- template_file_path = Glib::build_filename (template_dir_path, template_name + template_suffix);
- }
+ template_file_path = Glib::build_filename (template_dir_path, template_name + template_suffix);
}
SessionSaveUnderway (); /* EMIT SIGNAL */
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index dbda0aabb3..b613b35f82 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -271,7 +271,7 @@ Session::do_locate (samplepos_t target_sample, bool with_roll, bool with_flush,
(!auto_play_legal || !config.get_auto_play()) &&
!with_roll &&
!(synced_to_engine() && play_loop) &&
- (!Profile->get_trx() || !(config.get_external_sync() && !synced_to_engine()))) {
+ !(config.get_external_sync() && !synced_to_engine())) {
realtime_stop (false, true); // XXX paul - check if the 2nd arg is really correct
transport_was_stopped = true;
diff --git a/libs/ardour/source.cc b/libs/ardour/source.cc
index 8e509360a1..9aeb8ba62b 100644
--- a/libs/ardour/source.cc
+++ b/libs/ardour/source.cc
@@ -176,11 +176,6 @@ Source::set_state (const XMLNode& node, int version)
_flags = Flag (_flags | Destructive);
}
- if (Profile->get_trx() && (_flags & Destructive)) {
- error << string_compose (_("%1: this session uses destructive tracks, which are not supported"), PROGRAM_NAME) << endmsg;
- return -1;
- }
-
if (version < 3000) {
/* a source with an XML node must necessarily already exist,
and therefore cannot be removable/writable etc. etc.; 2.X
diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc
index 38af2d86b0..f43406843f 100644
--- a/libs/ardour/track.cc
+++ b/libs/ardour/track.cc
@@ -92,7 +92,7 @@ Track::init ()
DiskIOProcessor::Flag dflags = DiskIOProcessor::Recordable;
- if (_mode == Destructive && !Profile->get_trx()) {
+ if (_mode == Destructive) {
dflags = DiskIOProcessor::Flag (dflags | DiskIOProcessor::Destructive);
}