News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
Pages (2): « First < Previous 1 [2] Last »
Lua stand-alone audio library
Author Message
znarf
Junior Member
**


Posts: 34
Group: Registered
Joined: Jun 2007
Status: Offline
Reputation: 0
Post: #11
RE: Lua stand-alone audio library

ok, I had a look at the issue reported by jpjacobs, and, to my dislike, also on my machine I cannot get proteaAudio working under murgaLua Linux.

I'm wondering what could be the cause of it, my first guess was that there is something missing in murgaLua like bindings to libdl or so. Indeed, a test of murgaLua with ldd returned "Not a dynamic executable." However, then I realized that murgaLua is packed with upx, after decompression it obviously shows its binding to libdl.

So I do not have the slightest clue why there is this error. Since proteaAudio works with the unchanged standard Lua, this gives me the impression that there's something special with murgaLua. Has anyone ever been successful in creating a dynamic lua C module working with murgaLua under Linux? If yes, I'd be really keen on peeping in the Makefile. Please, if someone knows something about this, let me know, I'll happily adapt my build script.

01-23-2009 06:31 AM
Find all posts by this user Quote this message in a reply
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #12
RE: Lua stand-alone audio library

Quote:
Has anyone ever been successful in creating a dynamic lua C module working with murgaLua under Linux?

I'm no expert, but I've never successfully built a Linux C library for murgaLua, but I haven't had any success with Lua either.

01-24-2009 03:58 PM
Find all posts by this user Quote this message in a reply
Juergen
Member
***


Posts: 81
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #13
RE: Lua stand-alone audio library

znarf Wrote:
ok, I had a look at the issue reported by jpjacobs, and, to my dislike, also on my machine I cannot get proteaAudio working under murgaLua Linux.

I'm wondering what could be the cause of it, my first guess was that there is something missing in murgaLua like bindings to libdl or so. Indeed, a test of murgaLua with ldd returned "Not a dynamic executable." However, then I realized that murgaLua is packed with upx, after decompression it obviously shows its binding to libdl.

So I do not have the slightest clue why there is this error. Since proteaAudio works with the unchanged standard Lua, this gives me the impression that there's something special with murgaLua. Has anyone ever been successful in creating a dynamic lua C module working with murgaLua under Linux? If yes, I'd be really keen on peeping in the Makefile. Please, if someone knows something about this, let me know, I'll happily adapt my build script.


What type of error do you get? (Is it a segmentation fault or a linker problem)

I did try it and it works without a problem. It looks like you are using an older compiler, because I had to make a few changes to compile it, but then it worked without any problems.

To comile it with a newer compiler. you have to add "#include <cstdlib>" to playAudioRt.cpp and proAudioRt.cpp. proAudioRt.cpp also needs "<cstring>" and "<climits>", while "<cstdio>" is not needed. If this changes are made it should also compile with a current gcc.

Of course you also have to explictely link it to liblua.so either statically (which doesn't make sense) or dynamically. Therefore you need a compatible liblua.so.5.1 installed in a place where the dynamic linker can find it. While murgaLua is statically linked against liblua, it unfortunatelly doesn't extort those symbols and it also has no dependency for liblua set. Therefore your library needs the liblua dependency, so that the linker can load it and resolve those symbols. If you wan't to use a precompiled library that isn't exlicitely linked against liblua, then you can still preload it like: "LD_PRELOAD=/usr/lib/liblua.so murgaLua my_app.lua"

Juergen

01-26-2009 10:52 AM
Find all posts by this user Quote this message in a reply
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #14
RE: Lua stand-alone audio library

znarf Wrote:
ok, I had a look at the issue reported by jpjacobs, and, to my dislike, also on my machine I cannot get proteaAudio working under murgaLua Linux.


I am currently trying your lib with all the official murgaLua ports.

I didn't have any probs with Intel Linux, however, the new OpenMoko murgaLua does have some problems that I had to patch RtAudio itself in order to fix.

I have a lot of testing left to do, but it is something that I'd like to bundle with the final runtimes (if you don't mind).

As to when that will be, I don't know as I am very busy with work and I keep on making little tweaks to murgaLua.

Cheers
John de Murga

02-05-2009 01:10 AM
Visit this user's website Find all posts by this user Quote this message in a reply
znarf
Junior Member
**


Posts: 34
Group: Registered
Joined: Jun 2007
Status: Offline
Reputation: 0
Post: #15
RE: Lua stand-alone audio library

Hi,
thanks again for your feedback. I've updated proteaAudio according to Juergen's suggestions (additional includes) and moved the files in the zip archives to single subfolders (thanks to Jan-Pieter for this idea).

Quote:
the new OpenMoko murgaLua does have some problems that I had to patch RtAudio itself in order to fix.

I've updated rtAudio to the brand-new 4.0.5 release, which seems to fix a few issues.

Quote:
I have a lot of testing left to do, but it is something that I'd like to bundle with the final runtimes (if you don't mind).

Of course you are very welcome to bundle proteaAudio, as one of my motivations when writing it was to give something back to murgaLua.
If possible, I'd also like to apply your patches to the proteaAudio stand-alone release, in order to keep future improvements compatible.

Regards,
Gerald

02-05-2009 07:54 AM
Find all posts by this user Quote this message in a reply
Juergen
Member
***


Posts: 81
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #16
RE: Lua stand-alone audio library

znarf Wrote:
Hi,
thanks again for your feedback. I've updated proteaAudio according to Juergen's suggestions (additional includes) and moved the files in the zip archives to single subfolders (thanks to Jan-Pieter for this idea).

"rtaudio/RtAudio.cpp" is still missing the "#include <climits>". Otherwise I get an error, because INT_MAX is undeclared.

Also you did link explicitly against /usr/lib/liblua5.1.so which is an error. First the name should be liblua.so.5.1 and second if you link explicitly, the user has to provide the library "liblua5.1.so" (which is ill named), even if the symbols can be provided otherwise. If you use "-llua" then the compiler uses lazy linking and if the symbols can be resolved otherwise (from LD_PRELOAD or they are already imported from the interpreter or another library) the linker doesn't insist to load it.

Juergen

02-05-2009 08:57 AM
Find all posts by this user Quote this message in a reply
znarf
Junior Member
**


Posts: 34
Group: Registered
Joined: Jun 2007
Status: Offline
Reputation: 0
Post: #17
RE: Lua stand-alone audio library

Juergen Wrote:
"rtaudio/RtAudio.cpp" is still missing the "#include <climits>". Otherwise I get an error, because INT_MAX is undeclared.
Also you did link explicitly against /usr/lib/liblua5.1.so which is an error.

I'd like to apologize, both things are fixed now in the source package.

Thanks for reporting,
Gerald

02-06-2009 08:13 AM
Find all posts by this user Quote this message in a reply
Pages (2): « First < Previous 1 [2] Last »
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: