Hi, thanks for this fantastic project.
I am trying to load a DLL that I have created. The DLL conforms to the LUA specifications. When I use “require”, I it tries to look for a LUA file instead of a DLL. If I use “package.loadlib()”, it seems to load the lib without errors but I get an error calling a function.
local path = "C:\\MyModule.dll"
local MyModule = assert(loadlib(path, "luaopen_MyModule"))
MyModule() -- actually open the library
--local MyModule = require("MyModule") -- => loading MyModule.dll => executing luaopen_MyModule()
local w, h = MyModule.getDimensions()
print("getDimensions: " .. w .. " " .. h)
local result = MyModule.getMessage(1,"Hello", 3.5, true)
print(result)
I am going to use FFI instead, seems much easier to interface with standard dll’s. Also easier for me to write the dll’d
local ffi = package.preload.ffi()
ffi.cdef[[
const char* Pa_GetVersionText(void);
]]
local test = ffi.load("C:\\libportaudio64bit")
print(ffi.string(test.Pa_GetVersionText()))
I have designed an audio engine that allows you to process audio coming or going to any windows app. For example, you could add a reverb effect to your microphone before it reaches viber or you could boost the audio for all apps that playback sound. It also has its own low latency ASIO driver that gets converted to WDMKS with only 3ms of latency. It can do many other audio related things. I want to see if I can implement the GUI with Defold.