Re: Bass Library?
- Posted by Icy_Viking Aug 16, 2023
- 890 views
If you want to make an updated wrapper for the Bass library go for it. I thought about making a wrapper myself, but I already made a wrapper for SoLoud.
https://github.com/gAndy50/EuSoLoud
You can use it with 64-bit Euphoria, you just need to use the 64-bit DLL along with 64-bit euphoria. I need to update it for use with Greg's FFI library, but it still works well. I guess I should say .so or shared library file in your case since you're under Linux. My OS is Windows, but I do have WSL installed. So I can test for both Windows and Linux. I'm a 64-bit OS myself, but I use the 32-bit version of DLLs or shared libraries for compatibility reasons.
hi Ice_viking :) I tried SoLoud Library wrapper I downloaded the 64 bit dll with SDL.dll from SoLoud Library site and tried the "flags.e" file I got an error :(
/home/ronen/Documents/euphoria/EuSoLoud-main/EuSoLoud.ew:40 in function Soloud_create() c_proc/c_func: bad routine number (-1) ... called from /home/ronen/Documents/euphoria/EuSoLoud-main/Ex.exw:8 --> See ex.err ------------------ (program exited with code: 1) Press return to continue
any clue what I'm doing wrong? i tried to look for the .so libs for linux but all I found was dll files 86x and 64x I'm using the 64x dll...
Well here is the Soloud github. https://github.com/jarikomppa/soloud
You may have to build it from source for the .so files. The reason you're getting the bad routine id error is because you're probably using the 32-bit DLL on a 64-bit Euphoria. You'll need to use the 64-bit DLL/.so for it to work properly. You'll want the "Soloud_x64.DLL" instead of the "Soloud_x86.DLL" I should probably add in the 64-bit DLL. So users can pick between the 32 or 64-bit DLL.
include std/machine.e include std/dll.e include std/os.e atom sol ifdef WIN32 then --change WIN32 to WINDOWS sol = open_dll("soloud_x86.dll") -- change to soloud_x64.dll for 64-bits elsifdef LINUX or FREEBSD then sol = open_dll("soloud_x86.so") --change to soloud_x64.so for 64-bits end ifdef
Or since you're on Linux, you could probably just do this
include std/dll.e public atom sol = 0 ifdef LINUX or FREEBSD then sol = open_dll("soloud_x64.so") end ifdef