diff options
Diffstat (limited to 'conf.d/project/lua.d')
-rw-r--r-- | conf.d/project/lua.d/softmixer-01.lua | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/conf.d/project/lua.d/softmixer-01.lua b/conf.d/project/lua.d/softmixer-01.lua index d4ae580..8d7aae9 100644 --- a/conf.d/project/lua.d/softmixer-01.lua +++ b/conf.d/project/lua.d/softmixer-01.lua @@ -28,19 +28,42 @@ function _AlsaPingCB_ (source, result, context) end + -- Display receive arguments and echo them to caller -function _init_softmixer_ (source, args) +function _mixer_config_ (source, args) - -- create event to push change audio roles to potential listeners - _EventHandle=AFB:evtmake(source, "control") + local devin = { + ["path"]= "/dev/snd/by-path/platform-snd_aloop.0", + ["dev"]= 1, + ["sub"]= 0, + ["numid"]= 51, + } - -- get list of supported HAL devices - AFB:service(source, "alsacore","ping", {}, "_AlsaPingCB_", {}) + local devout = { + ["path"]= "/dev/snd/by-id/usb-YAMAHA_Corporation_YAMAHA_AP-U70_USB_Audio_00-00", + ["dev"]= 0, + ["sub"]= 0, + } - -- test Lua2C plugin - L2C:alsadmix(source, {}) + local params = { + ["rate"]= 44100, + ["channels"]= 2, + } - AFB:notice (source, "--InLua-- _init_softmixer_ done") + -- Call AlsaSoftRouter + L2C:alsarouter(source, {["devin"]= devin, ["devout"]= devout, ["params"]= params}) + + AFB:notice (source, "--InLua-- _mixer_config_ done") return 0 -- happy end end + +-- Display receive arguments and echo them to caller +function _init_softmixer_ (source, args) + + -- create event to push change audio roles to potential listeners + _EventHandle=AFB:evtmake(source, "control") + + _mixer_config_ (source, args) + +end |