X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fsimple.lua;h=8d5b3e673c1266a788d8eea043a337411a99b9bb;hb=b7398dd7960ddf07f03b9a9ebc669d29141c09d0;hp=3960505175e9637d1a2f627e1586c83691c59d41;hpb=2ba69dc78d091ad92427389147365f39760e0b1f;p=nageru diff --git a/nageru/simple.lua b/nageru/simple.lua index 3960505..8d5b3e6 100644 --- a/nageru/simple.lua +++ b/nageru/simple.lua @@ -32,17 +32,9 @@ function num_channels() return 2 end --- API ENTRY POINT --- Returns the name for each additional channel (starting from 2). --- Called at the start of the program, and then each frame for live --- channels in case they change resolution. -function channel_name(channel) - if channel == 2 then - return "First input" - elseif channel == 3 then - return "Second input" - end -end +-- Set some global state. +Nageru.set_channel_name(2, "First input") +Nageru.set_channel_name(3, "Second input") -- API ENTRY POINT -- Returns, given a channel number, which signal it corresponds to (starting from 0).