Allow to disable input auto-connect when creating tracks
Auto-connect is handled in a background thread, so newly created tracks are not immediately connected. This causes a race-condition when fan-out directly disconnects and re-connects ports after track/bus creation.
This commit is contained in:
parent
80f3b54be4
commit
c16ab3a248
@ -697,7 +697,8 @@ public:
|
|||||||
uint32_t how_many,
|
uint32_t how_many,
|
||||||
std::string name_template,
|
std::string name_template,
|
||||||
PresentationInfo::order_t order,
|
PresentationInfo::order_t order,
|
||||||
TrackMode mode = Normal
|
TrackMode mode = Normal,
|
||||||
|
bool input_auto_connect = true
|
||||||
);
|
);
|
||||||
|
|
||||||
std::list<boost::shared_ptr<MidiTrack> > new_midi_track (
|
std::list<boost::shared_ptr<MidiTrack> > new_midi_track (
|
||||||
|
@ -2695,7 +2695,7 @@ Session::ensure_route_presentation_info_gap (PresentationInfo::order_t first_new
|
|||||||
list< boost::shared_ptr<AudioTrack> >
|
list< boost::shared_ptr<AudioTrack> >
|
||||||
Session::new_audio_track (int input_channels, int output_channels, RouteGroup* route_group,
|
Session::new_audio_track (int input_channels, int output_channels, RouteGroup* route_group,
|
||||||
uint32_t how_many, string name_template, PresentationInfo::order_t order,
|
uint32_t how_many, string name_template, PresentationInfo::order_t order,
|
||||||
TrackMode mode)
|
TrackMode mode, bool input_auto_connect)
|
||||||
{
|
{
|
||||||
string track_name;
|
string track_name;
|
||||||
uint32_t track_id = 0;
|
uint32_t track_id = 0;
|
||||||
@ -2773,7 +2773,7 @@ Session::new_audio_track (int input_channels, int output_channels, RouteGroup* r
|
|||||||
failed:
|
failed:
|
||||||
if (!new_routes.empty()) {
|
if (!new_routes.empty()) {
|
||||||
StateProtector sp (this);
|
StateProtector sp (this);
|
||||||
add_routes (new_routes, true, true, false, order);
|
add_routes (new_routes, input_auto_connect, true, false, order);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user