Skip to content

Commit 155103c

Browse files
authored
Merge pull request #103 from processing/arm
Add support for ARM
2 parents b9862c0 + b3e2e7b commit 155103c

File tree

5 files changed

+25
-0
lines changed

5 files changed

+25
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
This is a processing interface and a collection of plugins for [Methcla](http://methc.la), a leight-weight, efficient sound engine for mobile devices.
44

55

6+
## Running on Linux
7+
8+
Make sure the following software packages are installed: libasound2 libflac8 libmpg123-0 libstdc++6 libsndfile1 libvorbis0a libvorbisenc2 libogg0
9+
10+
611
## Building the libMethClaInterface
712

813
The Java Library is to be compiled with ant. Please install the latest version on ant on your computer. The build.xml file is in in the root folder. Core.jar needs to be compiled and ready in ../../../core/library. To compile do
1.09 MB
Binary file not shown.

library/linux-armv6hf/libmethcla.so

4.43 MB
Binary file not shown.

src/cpp/Makefile_ARM

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# needs gcc-4.7 or later
2+
CXX := g++
3+
JAVA_INCLUDES :=
4+
LIB_DIR = ../../library/linux-armv6hf/
5+
LIBRARY = libMethClaInterface.so
6+
7+
.PHONY: $(LIBRARY) clean install
8+
9+
$(LIBRARY):
10+
$(CXX) -fPIC -I$(shell dirname $(shell realpath $(shell which javac)))/../include -I$(shell dirname $(shell realpath $(shell which javac)))/../include/linux -I./include -std=c++11 -g -c processing_sound_MethClaInterface.cpp
11+
$(CXX) -shared -L$(LIB_DIR) -Wl,-rpath,'$$ORIGIN' -o $@ *.o -lmethcla
12+
13+
clean:
14+
rm *.o
15+
rm *.jnilib
16+
17+
install: $(LIBRARY)
18+
cp $(LIBRARY) $(LIB_DIR)

src/cpp/processing_sound_MethClaInterface.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ JNIEXPORT jint JNICALL Java_processing_sound_MethClaInterface_engineNew (JNIEnv
7474
Methcla::EngineOptions options;
7575
options.audioDriver.bufferSize = bufferSize;
7676
options.audioDriver.numInputs = 2;
77+
#ifndef __arm__
7778
options.realtimeMemorySize = 1024 * 1024 * 1024;
79+
#endif
7880
options.maxNumNodes = 1024 * 40;
7981
options.maxNumAudioBuses = 512;
8082
options.addLibrary(methcla_plugins_sine)

0 commit comments

Comments
 (0)