re-do previous commit with less variables
This commit is contained in:
parent
024a061804
commit
e7fa40762c
@ -148,9 +148,6 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
||||
Recording = 2
|
||||
};
|
||||
|
||||
static const char * default_trx_track_name_pattern;
|
||||
static const char * default_ardour_track_name_pattern;
|
||||
|
||||
/* a new session might have non-empty mix_template, an existing session should always have an empty one.
|
||||
the bus profile can be null if no master out bus is required.
|
||||
*/
|
||||
|
@ -113,9 +113,6 @@ using namespace std;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
const char * Session::default_trx_track_name_pattern = "Track "; // add track number to the pattern
|
||||
const char * Session::default_ardour_track_name_pattern = "Audio "; // add track number to the pattern
|
||||
|
||||
bool Session::_disable_all_loaded_plugins = false;
|
||||
|
||||
PBD::Signal1<int,uint32_t> Session::AudioEngineSetupRequired;
|
||||
@ -2429,18 +2426,19 @@ Session::new_audio_track (int input_channels, int output_channels, TrackMode mod
|
||||
RouteList new_routes;
|
||||
list<boost::shared_ptr<AudioTrack> > ret;
|
||||
|
||||
string name_pattern("");
|
||||
string name_pattern;
|
||||
|
||||
if (Profile->get_trx() ) {
|
||||
name_pattern = default_trx_track_name_pattern;
|
||||
name_pattern = "Track ";
|
||||
} else {
|
||||
name_pattern = default_ardour_track_name_pattern;
|
||||
name_pattern = "Audio ";
|
||||
}
|
||||
|
||||
bool const use_number = (how_many != 1) || name_template.empty () || name_template == _(name_pattern.c_str() );
|
||||
|
||||
while (how_many) {
|
||||
|
||||
if (!find_route_name (name_template.empty() ? _(name_pattern.c_str() ) : name_template, ++track_id, track_name, sizeof(track_name), use_number)) {
|
||||
if (!find_route_name (name_template.empty() ? _(name_pattern.c_str()) : name_template, ++track_id, track_name, sizeof(track_name), use_number)) {
|
||||
error << "cannot find name for new audio track" << endmsg;
|
||||
goto failed;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user