mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
Fix processor invalidation issue with substiuted routes
This commit is contained in:
parent
9ccace8f0d
commit
0ad9d57154
1 changed files with 20 additions and 4 deletions
|
|
@ -268,6 +268,7 @@ function factory() return function()
|
||||||
function recall(debug, dry_run)
|
function recall(debug, dry_run)
|
||||||
local file = io.open(path, "r")
|
local file = io.open(path, "r")
|
||||||
assert(file, "File not found!")
|
assert(file, "File not found!")
|
||||||
|
local bypass_routes = {}
|
||||||
|
|
||||||
local i = 0
|
local i = 0
|
||||||
for l in file:lines() do
|
for l in file:lines() do
|
||||||
|
|
@ -311,7 +312,10 @@ function factory() return function()
|
||||||
|
|
||||||
if route then
|
if route then
|
||||||
local substitution = tonumber(dry_run["destination-"..i])
|
local substitution = tonumber(dry_run["destination-"..i])
|
||||||
if skip_line or (substitution == 0) then goto nextline end
|
if skip_line or (substitution == 0) then
|
||||||
|
bypass_routes[#bypass_routes + 1] = instance["route_id"]
|
||||||
|
goto nextline
|
||||||
|
end
|
||||||
|
|
||||||
local old_order = ARDOUR.ProcessorList()
|
local old_order = ARDOUR.ProcessorList()
|
||||||
local route_id = instance["route_id"]
|
local route_id = instance["route_id"]
|
||||||
|
|
@ -326,6 +330,8 @@ function factory() return function()
|
||||||
|
|
||||||
if not(substitution == instance["route_id"]) then
|
if not(substitution == instance["route_id"]) then
|
||||||
print('SUBSTITUTION FOR: ', name, substitution, Session:route_by_id(PBD.ID(substitution)):name())
|
print('SUBSTITUTION FOR: ', name, substitution, Session:route_by_id(PBD.ID(substitution)):name())
|
||||||
|
--bypass_routes[#bypass_routes + 1] = route_id
|
||||||
|
was_subbed = true
|
||||||
r_id = PBD.ID(substitution)
|
r_id = PBD.ID(substitution)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -345,7 +351,10 @@ function factory() return function()
|
||||||
well_known = {'PRE', 'Trim', 'EQ', 'Comp', 'Fader', 'POST'}
|
well_known = {'PRE', 'Trim', 'EQ', 'Comp', 'Fader', 'POST'}
|
||||||
|
|
||||||
for k, v in pairs(order) do
|
for k, v in pairs(order) do
|
||||||
local proc = Session:processor_by_id(PBD.ID(v))
|
local proc = Session:processor_by_id(PBD.ID(1))
|
||||||
|
if not(was_subbed) then
|
||||||
|
proc = Session:processor_by_id(PBD.ID(v))
|
||||||
|
end
|
||||||
if proc:isnil() then
|
if proc:isnil() then
|
||||||
for id, name in pairs(cache) do
|
for id, name in pairs(cache) do
|
||||||
if v == id then
|
if v == id then
|
||||||
|
|
@ -368,18 +377,25 @@ function factory() return function()
|
||||||
::nextproc::
|
::nextproc::
|
||||||
if proc and not(proc:isnil()) then old_order:push_back(proc) end
|
if proc and not(proc:isnil()) then old_order:push_back(proc) end
|
||||||
end
|
end
|
||||||
|
rt:reorder_processors(old_order, nil)
|
||||||
if muted then rt:mute_control():set_value(1, 1) else rt:mute_control():set_value(0, 1) end
|
if muted then rt:mute_control():set_value(1, 1) else rt:mute_control():set_value(0, 1) end
|
||||||
if soloed then rt:solo_control():set_value(1, 1) else rt:solo_control():set_value(0, 1) end
|
if soloed then rt:solo_control():set_value(1, 1) else rt:solo_control():set_value(0, 1) end
|
||||||
rt:gain_control():set_value(gc, 1)
|
rt:gain_control():set_value(gc, 1)
|
||||||
rt:trim_control():set_value(tc, 1)
|
rt:trim_control():set_value(tc, 1)
|
||||||
if pc ~= false then rt:pan_azimuth_control():set_value(pc, 1) end
|
if pc ~= false then rt:pan_azimuth_control():set_value(pc, 1) end
|
||||||
rt:reorder_processors(old_order, nil)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if plugin then
|
if plugin then
|
||||||
if skip_line then goto nextline end
|
if skip_line then goto nextline end
|
||||||
|
|
||||||
|
--if the plugin is owned by a route
|
||||||
|
--we decided not to use, skip it
|
||||||
|
for _, v in pairs(bypass_routes) do
|
||||||
|
if instance["owned_by_route_id"] == v then
|
||||||
|
goto nextline
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local enable = {}
|
local enable = {}
|
||||||
local params = instance["parameters"]
|
local params = instance["parameters"]
|
||||||
local p_id = instance["plugin_id"]
|
local p_id = instance["plugin_id"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue