Fix ExportFormatSpecification copy-c'tor
[ardour.git] / scripts / s_whoami.lua
1 ardour { ["type"] = "Snippet", name = "Who Am I?" }
2
3 function factory() return function()
4
5 function whoami()
6         --pcall is the lua equivalent
7         --of try: ... catch: ...
8         if not pcall(function() local first_check = Session:get_mixbus(0) end) then
9                 return "Ardour"
10         else
11                 local second_check = Session:get_mixbus(11)
12                 if second_check:isnil() then
13                         return "Mixbus"
14                 else
15                         return "32C"
16                 end
17         end
18 end
19
20 print(whoami())
21
22 end end