Add option to skip MIDI track input auto-connect

This commit is contained in:
Robin Gareus 2021-01-08 22:24:40 +01:00
parent 038307fef6
commit 5974e61854
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
4 changed files with 6 additions and 5 deletions

View File

@ -722,7 +722,8 @@ public:
Plugin::PresetRecord* pset,
RouteGroup* route_group, uint32_t how_many, std::string name_template,
PresentationInfo::order_t,
TrackMode mode = Normal
TrackMode mode = Normal,
bool input_auto_connect = true
);
RouteList new_audio_route (int input_channels, int output_channels, RouteGroup* route_group, uint32_t how_many, std::string name_template, PresentationInfo::Flag, PresentationInfo::order_t);

View File

@ -2390,7 +2390,7 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, bool s
boost::shared_ptr<PluginInfo> instrument, Plugin::PresetRecord* pset,
RouteGroup* route_group, uint32_t how_many,
string name_template, PresentationInfo::order_t order,
TrackMode mode)
TrackMode mode, bool input_auto_connect)
{
string track_name;
uint32_t track_id = 0;
@ -2463,7 +2463,7 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, bool s
ChanCount existing_outputs;
count_existing_track_channels (existing_inputs, existing_outputs);
add_routes (new_routes, true, !instrument, order);
add_routes (new_routes, input_auto_connect, !instrument, order);
load_and_connect_instruments (new_routes, strict_io, instrument, pset, existing_outputs);
}

View File

@ -65,7 +65,7 @@ function factory (p) return function ()
ARDOUR.PluginInfo(), nil, -- no instrument, no instrument preset
group,
16, -- how many
name, insert_at, ARDOUR.TrackMode.Normal)
name, insert_at, ARDOUR.TrackMode.Normal, true)
local i = 1
for track in tl:iter() do

View File

@ -73,6 +73,6 @@ function factory (params) return function ()
ARDOUR.ChanCount(ARDOUR.DataType ("audio"), 2),
strict_io,
instrument, nil,
group, how_many, name, insert_at, ARDOUR.TrackMode.Normal)
group, how_many, name, insert_at, ARDOUR.TrackMode.Normal, true)
end end