aboutsummaryrefslogtreecommitdiffhomepage
path: root/applause.lua
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2016-09-25 23:32:37 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2016-09-26 01:49:58 +0200
commit27bd937edb8304378ff60c9c7874b6e61b07ce3b (patch)
treea2f89c8c776e5956afcaa6a0ffde78e565dbc4d7 /applause.lua
parentd33333d4f8f34b1fe5a9e3248003fe4fd05c4805 (diff)
downloadapplause2-27bd937edb8304378ff60c9c7874b6e61b07ce3b.tar.gz
added LADSPA plugin host (LADSPAStream and Stream:LADSPA())
* E.g. LADSPAStream("sine", 880):play(). The sine plugin is currently twice as fast as the native Applause implementation even though a block size of 1 sample is used (ie. compared to Stream.SinOsc). * all LADSPA features should be supported * Takes arbitrary Streams as input and produces a normal Applause stream. * multi-channel output plugins supported * LADSPA port mapping is possible by array, by name and by argument list. * Even though LADSPAStream is not muxable (it is more like SndfileStream), every input stream or default value is currently converted to a Stream. This can be optimized by storing scalars in their own arrays. They don't have to be ticked.
Diffstat (limited to 'applause.lua')
-rw-r--r--applause.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/applause.lua b/applause.lua
index 4e87d74..dd0ea56 100644
--- a/applause.lua
+++ b/applause.lua
@@ -10,7 +10,9 @@ require "table.new"
require "table.clear"
-- Useful in order to make the module reloadable
-local function cdef_safe(def)
+-- NOTE: This is global, so it can be used in reloadable
+-- submodules
+function cdef_safe(def)
local state, msg = pcall(ffi.cdef, def)
if not state then
io.stderr:write("WARNING: ", msg, "\n")
@@ -2298,3 +2300,9 @@ function Client:kill()
end
Client.__gc = Client.kill
+
+--
+-- Additional modules are loaded with dofile(),
+-- so they react to reload()
+--
+dofile "ladspa.lua"