From 2226da1385f3f2f63fce89ce6b1e0a8d548e3ffc Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 6 Jan 2023 00:52:51 +0100 Subject: [PATCH] VST3: retain I/O from older versions (bump session format) A VST3 plugin can have additional busses which were not available in older versions of Ardour. For compatibility reasons those should remain unconnected. This is achieved by using a custom I/O config (same way a user would configure this). --- libs/ardour/plugin_insert.cc | 10 +++++++++- libs/ardour/wscript | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index 88be372ca4..13b176538d 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -3,7 +3,7 @@ * Copyright (C) 2007-2012 Carl Hetherington * Copyright (C) 2007-2014 David Robillard * Copyright (C) 2008-2009 Sampo Savolainen - * Copyright (C) 2013-2019 Robin Gareus + * Copyright (C) 2013-2023 Robin Gareus * Copyright (C) 2016-2017 Tim Mayberry * Copyright (C) 2018 Johannes Mueller * @@ -2824,6 +2824,14 @@ PluginInsert::set_state(const XMLNode& node, int version) } } + if (version < 7002 && !_custom_cfg /* && !strict_io ()*/ && plugin()->get_info ()->type == ARDOUR::VST3) { + if (_configured_in != plugin()->get_info()->n_inputs * _plugins.size () || + _configured_out != plugin()->get_info()->n_outputs * _plugins.size ()) { + /* do not add VST busses which were not previously available */ + _custom_cfg = true; + } + } + if (in_maps == out_maps && out_maps >0 && out_maps == get_count()) { _maps_from_state = true; } diff --git a/libs/ardour/wscript b/libs/ardour/wscript index fb001afce5..e3428f76ae 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -8,7 +8,7 @@ import subprocess import sys # default state file version for this build -CURRENT_SESSION_FILE_VERSION = 7001 +CURRENT_SESSION_FILE_VERSION = 7002 I18N_PACKAGE = 'ardour'