summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-01-09 18:18:46 +0100
committerRobin Gareus <robin@gareus.org>2020-01-09 18:21:48 +0100
commit16549e86e3ffb395084f6ae6143fb0063128a813 (patch)
tree7f986b1fad6e44b449ec83190204f99e0feb0491 /scripts
parent0f85a3348759f70b4e8ee4ef6ef3b9810cf347f3 (diff)
Latency debug script: include MIDI ports
Diffstat (limited to 'scripts')
-rw-r--r--scripts/_dump_latency.lua17
1 files changed, 16 insertions, 1 deletions
diff --git a/scripts/_dump_latency.lua b/scripts/_dump_latency.lua
index d21af36804..9303e29508 100644
--- a/scripts/_dump_latency.lua
+++ b/scripts/_dump_latency.lua
@@ -5,7 +5,7 @@ ardour { ["type"] = "Snippet", name = "Dump Latency",
function factory () return function ()
local all_procs = true
- local show_ports = false
+ local show_ports = true
print (" -- Session --")
print ("Worst Output Latency: ", Session:worst_output_latency ())
@@ -58,5 +58,20 @@ function factory () return function ()
lp[1].min, lp[1].max, ppl.min, ppl.max, bpl.min, bpl.max,
lc[1].min, lc[1].max, pcl.min, pcl.max, bcl.min, bcl.max))
end
+ _, t = a:get_ports (ARDOUR.DataType("midi"), ARDOUR.PortList())
+ -- table 't' holds argument references. t[2] is the PortList
+ for p in t[2]:iter() do
+ local lp = p:get_connected_latency_range (ARDOUR.LatencyRange(), true)
+ local lc = p:get_connected_latency_range (ARDOUR.LatencyRange(), false)
+ local ppl = p:private_latency_range (true)
+ local pcl = p:private_latency_range (false)
+ local bpl = p:public_latency_range (true)
+ local bcl = p:public_latency_range (false)
+ print (string.format ("%-30s play: (%4d, %4d) (%4d, %4d) (%4d, %4d) capt: (%4d, %4d) (%4d, %4d) (%4d, %4d)",
+ p:name(),
+ lp[1].min, lp[1].max, ppl.min, ppl.max, bpl.min, bpl.max,
+ lc[1].min, lc[1].max, pcl.min, pcl.max, bcl.min, bcl.max))
+ end
end
+ collectgarbage ()
end end