Re: Bass Library?
- Posted by petelomax Aug 17, 2023
- 616 views
hello I answered to you by email (sent you a mail to your profile address)
Probably better if we communicate here: we've got nothing to hide, someone else might take an interest
and maybe even chip in at some point with a fix for something stumping both of us two, or while I sleep.
It's actually been quite a while since I wrote any Eu-compatible code, so I might need the odd correction.
bass.e:21 <0069>:: expected ',' or ')'
Ah yes, Eu uses iif() whereas Phix can use that or iff(). Will correct that.
I tried to run AudioOverlapLoop.exw
Good choice, the AudioAlarm example I linked would be nightmarish to get working on Eu, since my pGUI.e
is strictly Phix-only, and it would be much easier to start that from scratch, or translate a C sample.
sudo cp libbass.so /usr/local/lib (to copy bass library into linux lib)
sudo chmod a+rx /usr/local/lib/libbass.so (to load the lib)
sudo ldconfig (to autoconfig)
That'll do nicely, thanks. I've updated the PCAN page
(Obviously you just need bass.e and don't need and can ignore the binaries)
Ah, I forgot the updated sample:
constant dl = `Download rosetta\bass\ from http://phix.x10.mx/pmwiki/pmwiki.php?n=Main.Bass` --/**/constant ftok = get_file_type("bass")=FILETYPE_DIRECTORY --/* include std/filesys.e -- file_type() include std/console.e -- wait_key() constant ftok = file_type("bass")=2 --*/ if not ftok then crash(dl) end if include bass\bass.e BASS_Init(-1, 44100) for i=1 to 5 do atom filePlayerHandle = BASS_StreamCreateFile(false, `bass\Scream01.mp3`) BASS_ChannelPlay(filePlayerHandle) sleep(0.2) end for ?"done" integer k = wait_key()
If that doesn't work, can you try replacing two lines near the top of bass.e with these:
libnames = {sprintf(`bass\%d\bass.dll`,{machine_bits()}),"libbass.so"}, libname = libnames[lwdx],