Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/Util/CSoundClient.py13
-rw-r--r--common/Util/Clooper/Makefile10
2 files changed, 21 insertions, 2 deletions
diff --git a/common/Util/CSoundClient.py b/common/Util/CSoundClient.py
index 44f61c5..89e8eff 100644
--- a/common/Util/CSoundClient.py
+++ b/common/Util/CSoundClient.py
@@ -7,10 +7,21 @@ import time
import array
from math import sqrt
+# binary blobs rock&roll
+try:
+ from common.Util.Clooper.aclient import *
+except:
+ try:
+ from common.Util.Clooper.linux32_508.aclient import *
+ except:
+ try:
+ from common.Util.Clooper.linux32_510.aclient import *
+ except:
+ from common.Util.Clooper.linux64_510.aclient import *
+
import common.Config as Config
from common.Generation.GenerationConstants import GenerationConstants
-from common.Util.Clooper.aclient import *
from common.Util import NoteDB
import common.Util.InstrumentDB as InstrumentDB
diff --git a/common/Util/Clooper/Makefile b/common/Util/Clooper/Makefile
index c929fed..f82d475 100644
--- a/common/Util/Clooper/Makefile
+++ b/common/Util/Clooper/Makefile
@@ -1,15 +1,23 @@
CC=gcc
+CSOUND_ARCH = $(shell arch | grep 64 >/dev/null && echo linux64 || echo linux32)
+CSOUND_VERSION = $(shell csound --version 2>&1 | grep -o "Csound version [0-9]\+\.[0-9]\+" | awk '{print $$3}' | sed s/\\.//g)
+LIB_NAME = $(CSOUND_ARCH)_$(CSOUND_VERSION)
+
CXXFLAGS = $(shell python-config --cflags) \
-Wall -Werror -fPIC -O2 -finline
LDFLAGS+= $(python-config --libs) \
-lasound -lcsound
all : aclient.so
+ rm -rf $(LIB_NAME)
+ mkdir $(LIB_NAME)
+ mv aclient.so $(LIB_NAME)/
+ touch $(LIB_NAME)/__init__.py
aclient.so : aclient.cpp audio.cpp
g++ $(CXXFLAGS) -shared -o $@ $< $(LDFLAGS)
clean :
- rm aclient.so
+ rm aclient*.so