1 ardour { ["type"] = "Snippet", name = "portengine" }
2 function factory () return function ()
5 print ("----- Port objects from Ardour's engine ----");
6 _, t = a:get_ports (ARDOUR.DataType("audio"), ARDOUR.PortList())
7 -- table 't' holds argument references. t[2] is the PortList
8 for p in t[2]:iter() do
12 print ("----- Port names queries from the backend ----");
13 _, t = a:get_backend_ports ("", ARDOUR.DataType("audio"), 0, C.StringVector())
14 -- table 't' holds argument references. t[4] is the StringVector
15 for n in t[4]:iter() do
19 print ("----- Connections from the backend ----");
20 _, t = a:get_backend_ports ("", ARDOUR.DataType("audio"), ARDOUR.PortFlags.IsOutput, C.StringVector())
21 for n in t[4]:iter() do
22 local printed_name = false;
23 _, ct = a:get_connections (n, C.StringVector())
24 for c in ct[2]:iter() do
25 if (not printed_name) then