Skip to content

Commit

Permalink
fix build and play with the test file
Browse files Browse the repository at this point in the history
  • Loading branch information
fps committed Mar 29, 2013
1 parent a966f96 commit a708362
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
10 changes: 6 additions & 4 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,27 @@ PKGCONFIG_DIR ?= $(PREFIX)/lib/pkgconfig

.PHONY: install all clean

all: ladspamm-0-test _ladspamm0.so
all: ladspamm-0-test built_python

install: all
$(INSTALL) -d $(PKGCONFIG_DIR)
$(INSTALL) ladspamm.pc $(PKGCONFIG_DIR)/ladspamm-0.pc
$(INSTALL) ladspamm-0.pc $(PKGCONFIG_DIR)/
$(SED) -i -e s@PREFIX@$(PREFIX)@g $(PKGCONFIG_DIR)/ladspamm-0.pc
$(INSTALL) -d $(INCLUDE_PATH)
$(INSTALL) ladspamm-0/*.h $(INCLUDE_PATH)
python setup.py install

ladspamm-0-test: ladspamm-test.cc
g++ -I . -ansi -Wall -g -O0 -o ladspamm-0-test ladspamm-test.cc -ldl -lboost_system -lboost_filesystem

docs:
doxygen

_ladspamm0.so: ladspamm0.i
built_python: ladspamm0.i
swig -python -c++ -o ladspamm_wrap.cc ladspamm0.i
python setup.py build_ext -ldl -lboost_system -lboost_filesystem -I .
touch built_python

clean:
rm -f _ladspamm0.so ladspamm_wrap.cc ladspamm-0-test ladspamm0.py
rm -f _ladspamm0.so ladspamm_wrap.cc ladspamm-0-test ladspamm0.py built_python

14 changes: 7 additions & 7 deletions test_ladspamm0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

w = ladspamm0.world()

print (w.libraries)
print len(w.libraries)
print (w.libraries[0])
print (w.libraries[0].plugins)
print (w.libraries[0].plugins[0])
print (w.libraries[0].plugins[0].name())
print (w.libraries[0].plugins[0].port_lower_bound(0))
print ("Number of libraries:", len(w.libraries))

for lib in w.libraries:
print(" Number of plugins: ", len(lib.plugins))

for plugin in lib.plugins:
print(" Name:", plugin.name(), "Label:", plugin.label())

i = ladspamm0.plugin_instance(w.libraries[0].plugins[0], 48000)

print ("default:", i.port_default(0))
Expand Down

0 comments on commit a708362

Please sign in to comment.