Welcome to the Indigo Rose Software discussion forums! You will need to sign up for a forum account and login before you can post. Need help? View the Forum FAQ.
this is in regards with my post Play music in other soundcard, i also posted it outside IR, and one contributor shared example using Luajit and ffi.. but my project doest work with luajit so he advice to compile the ffi and put it in the Scripts folder.
ADVICE: USE LUAJIT INSTEAD ORIGINAL LUA ENGINE only luajit includes ffi module built in, if not, please include luaffi.dll on scripts (but you should compile yourself) Theres a thread on this forum to replace lua5.1.4 with luajit, also lua5.1.dll shipped on my example is the correct one.
I borrowed the definition of lua-ffi from here then just copied libvlc files from its binary package
luaffi is a binding to libffi, a foreign function interface framework. With this library, you can do what MemoryEx allows you to do for cdecl and stdcall calling conventions: call functions from binaries. It also allows you to wrap functions in callbacks, i.e. create a new C-function you can use in API calls that in turn proxies the call to your callback. This can in turn be used to wrap Lua functions and use them in API calls.
It's a pretty cool library, there should be a regular luaffi binding somewhere - but I ended up making my own binding in my own projects. I don't have a version I can simply share, as it is embedded in my framework.
Hello IP, thanks for sharing, but unfortunately i am not a programmer, i just learn very basic syntax and just used AMS application,
The ffi.dll is required to make play music into specific audio soundcard. but ffi.dll only runs with luajit and my project does not support it.. i wonder if building the ff.dll and put it in scripts folder will help as per advice but my problem i dont know how to build it, where to start and what are other needed.. unlike AMS once you have the code just paste it and build/publish.
the thing i want to achieve is this https://forums.indigorose.com/forum/...dio-sound-card
then someone give me example.apz it works i can play music to other sound card but it used luajit and when i try to incorporate it with my project it doesnt work because my project does not support luajit.. and one of his advice is to compile ffi.dll and put it to Scripts but i cant help my self how to do it.
if there is other way to play music to other soundcard in AMS using any plugin or maybe the MemoryEx that you mention that would be very helpful.
Yes I know the existing luaffi binding, however what specifically did you find to achieve what you want? Maybe the example code you find is possible with MemoryEx. MemoryEx can call C functions as well, plus it allows for struct allocation and generic memory interaction.
Can you share what you have found using luaffi in the original question thread?
Actually what i am trying to achieved is using AMS i can play a music/video and the sound will output NOT in the default soundcard but instead on other if its available.
Ex. on my PC i have soundcard:
1. Realtek
2. USB PnP SoundCard
all music in AMS will play default in Realtek..
this time i want to play it in USB PnP.
Comment