diff options
author | Pixel <pixel@nobis-crew.org> | 2009-12-23 00:11:30 +0100 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2009-12-23 00:11:30 +0100 |
commit | f6ac50837aabd69c6ea5892a858359f51f40ee03 (patch) | |
tree | fd6f7007d543de2cca7a813e8efbf156089aa0eb /dalos-buffer.lua | |
parent | 95b71cfc474f247e7e1081ea67c7a2166ddd3805 (diff) |
Mbmbmlmlm \r is evil.
Diffstat (limited to 'dalos-buffer.lua')
-rw-r--r-- | dalos-buffer.lua | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/dalos-buffer.lua b/dalos-buffer.lua index ecab2ed..8abcadc 100644 --- a/dalos-buffer.lua +++ b/dalos-buffer.lua @@ -1,30 +1,30 @@ -dalosp.buffer = {
- input_change = function (self, ind)
- local h = self:get_linked_input(1)
- if h then
- self.color = cd.GREEN
- local b = Buffer(true)
- b:copyfrom(self:get_linked_input(1))
- self:set_houtput(b)
- else
- self:set_houtput(nil)
- self.color = cd.YELLOW
- end
- self.dcanvas:draw()
- end,
-
- create = function (d, tab, settings)
- tab.ninputs = 1
- tab.noutputs = 1
- tab.otype = dalos.objtype.LUA_FILTER
- tab.default_name = "Buffer"
- tab.input_change = dalosp.buffer.input_change
- tab.ntype = "Buffer"
- local obj = dalos.object(d, tab, extra)
-
- return obj
- end,
-}
-
-dalos.buffer = dalosp.buffer.create
-dalos:register_obj("Buffer", dalos.buffer)
+dalosp.buffer = { + input_change = function (self, ind) + local h = self:get_linked_input(1) + if h then + self.color = cd.GREEN + local b = Buffer(true) + b:copyfrom(self:get_linked_input(1)) + self:set_houtput(b) + else + self:set_houtput(nil) + self.color = cd.YELLOW + end + self.dcanvas:draw() + end, + + create = function (d, tab, settings) + tab.ninputs = 1 + tab.noutputs = 1 + tab.otype = dalos.objtype.LUA_FILTER + tab.default_name = "Buffer" + tab.input_change = dalosp.buffer.input_change + tab.ntype = "Buffer" + local obj = dalos.object(d, tab, extra) + + return obj + end, +} + +dalos.buffer = dalosp.buffer.create +dalos:register_obj("Buffer", dalos.buffer) |