lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, 2010-12-27 at 20:09 +0100, Shamun toha md wrote:
> ... ProteaAudio for Lua binding ...

Just out of curiosity, I managed to compile the binding and successfully
run the examples.

You are correct to state that the build system is flawed, and needs some
steps to compile correctly. Here is what I did:

1) Get the latest ProteaAudio and also the RtAudio code from
http://www.music.mcgill.ca/~gary/rtaudio/release/rtaudio-4.0.7.tar.gz

2) Update the RtAudio code in ProteaAudio:

$ cp -r rtaudio-4.0.7/RtAudio.* rtaudio-4.0.7/RtError.h
rtaudio-4.0.7/include proteaAudio_src_090204/rtaudio

3) Modify the ProteaAudio makefile to suit your needs
4) $ make
5) $ make lua
6) Copy the resulting proAudioRt.so somewhere in your LUA_CPATH
7) ???
8) Profit :)

The diff of necessary changes in step 3 is in the attachment, modify the
path to suit your installation of Lua (this works on Ubuntu).



diff -u proteaAudio_src_090204/Makefile proteaAudio_modified/Makefile
--- proteaAudio_src_090204/Makefile	2009-02-05 22:07:02.000000000 +0100
+++ proteaAudio_modified/Makefile	2010-12-27 21:24:02.053405791 +0100
@@ -13,7 +13,7 @@
 LIBDIR =
 
 # settings for optional libSDL backend:
-INCDIR += -I../archive/baseCode/include
+INCDIR += -I../archive/baseCode/include -I/usr/include/lua5.1
 SDLLIB = -lSDLmain -lSDL
 SDLDIR = -L/usr/lib -L../archive/baseCode/lib
 
@@ -21,8 +21,8 @@
 ARCH = $(shell uname -s)
 ifeq ($(ARCH),Linux)
   LIBS          = $(LIBDIR) $(LIB) -lpthread -lasound
-  LUALIB      = -llua -ldl
-  CFLAGS += -DHAVE_GETTIMEOFDAY -D__LINUX_ALSA__ #-D__LINUX_OSS__
+  LUALIB      = -llua5.1 -ldl
+  CFLAGS += -fPIC -DHAVE_GETTIMEOFDAY -D__LINUX_ALSA__ #-D__LINUX_OSS__
   DLLFLAGS =  -fPIC -shared
   DLLSUFFIX = .so
   EXESUFFIX =