shithub: aubio

Download patch

ref: 1094f52d19f00d26a57e43ef2ea5a2b0ead19f85
parent: 1cc007c49f4577bb13a0dde68fef67ed1abcefa1
author: Paul Brossier <piem@piem.org>
date: Tue Sep 29 23:45:12 EDT 2009

created interfaces directory, moved java there and added new python draft interface

--- a/configure.ac
+++ b/configure.ac
@@ -250,8 +250,8 @@
     swig/Makefile
     python/Makefile
     python/aubio/Makefile
-    java/Makefile
-    java/aubio/Makefile
+    interfaces/java/Makefile
+    interfaces/java/aubio/Makefile
     plugins/Makefile
     plugins/audacity/Makefile
     plugins/audacity/plug-ins/Makefile
--- /dev/null
+++ b/interfaces/java/Makefile.am
@@ -1,0 +1,1 @@
+SUBDIRS = aubio
--- /dev/null
+++ b/interfaces/java/aubio/Makefile.am
@@ -1,0 +1,32 @@
+NOWARN_CFLAGS = -Wno-strict-aliasing
+
+AM_CFLAGS = @AUBIO_CFLAGS@ $(NOWARN_CFLAGS) $(SWCFLAGS) \
+	-I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_srcdir)/ext \
+	-I/usr/lib/jvm/java-6-sun-1.6.0.04/include \
+	-I${prefix}/lib/jvm/java-6-sun-1.6.0.04/include \
+	-I/usr/lib/jvm/java-6-sun-1.6.0.04/include/linux \
+	-I${prefix}/lib/jvm/java-6-sun-1.6.0.04/include/linux \
+	-I/usr/include \
+	-I${prefix}/include
+
+SWLDFLAGS = -shared
+
+AUBIO_LDFLAGS = $(SWLDFLAGS) \
+	-L$(top_builddir)/ext -laubioext \
+	-L$(top_builddir)/src -laubio
+
+pkgjavadir = ${libdir}/java/aubio
+
+pkgjava_LTLIBRARIES = libaubiowrapper.la
+
+libaubiowrapper_la_LDFLAGS = -module -avoid-version $(AUBIO_LDFLAGS) 
+libaubiowrapper_la_SOURCES = aubio_wrap.c
+
+aubio_wrap.c:
+	$(SWIG) -outdir . -o aubio_wrap.c -java $(top_srcdir)/swig/aubio.i
+
+CLEANFILES = aubio_* SWIGTYPE_* *aubiowrapper* midi_* 
+
+simple_test:
+	javac *.java
+	LD_LIBRARY_PATH=.libs java main 
--- /dev/null
+++ b/interfaces/java/aubio/main.java
@@ -1,0 +1,19 @@
+// main.java
+
+public class main {
+  static {
+    System.loadLibrary("aubiowrapper");
+  }
+
+  public static void main(String argv[]) {
+    float freq = (float)440.;
+    float midi = aubiowrapper.aubio_freqtomidi( (float)440.);
+    if (midi != (float) 69.0) {
+      throw new Error((String) "Error: aubio_freqtomidi(440.) != 69.", null);
+    }
+    System.out.print(freq);
+    System.out.print(" Hz corresponds to midi note ");
+    System.out.println(midi);
+  }
+}
+
--- a/java/Makefile.am
+++ /dev/null
@@ -1,1 +1,0 @@
-SUBDIRS = aubio
--- a/java/aubio/Makefile.am
+++ /dev/null
@@ -1,32 +1,0 @@
-NOWARN_CFLAGS = -Wno-strict-aliasing
-
-AM_CFLAGS = @AUBIO_CFLAGS@ $(NOWARN_CFLAGS) $(SWCFLAGS) \
-	-I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_srcdir)/ext \
-	-I/usr/lib/jvm/java-6-sun-1.6.0.04/include \
-	-I${prefix}/lib/jvm/java-6-sun-1.6.0.04/include \
-	-I/usr/lib/jvm/java-6-sun-1.6.0.04/include/linux \
-	-I${prefix}/lib/jvm/java-6-sun-1.6.0.04/include/linux \
-	-I/usr/include \
-	-I${prefix}/include
-
-SWLDFLAGS = -shared
-
-AUBIO_LDFLAGS = $(SWLDFLAGS) \
-	-L$(top_builddir)/ext -laubioext \
-	-L$(top_builddir)/src -laubio
-
-pkgjavadir = ${libdir}/java/aubio
-
-pkgjava_LTLIBRARIES = libaubiowrapper.la
-
-libaubiowrapper_la_LDFLAGS = -module -avoid-version $(AUBIO_LDFLAGS) 
-libaubiowrapper_la_SOURCES = aubio_wrap.c
-
-aubio_wrap.c:
-	$(SWIG) -outdir . -o aubio_wrap.c -java $(top_srcdir)/swig/aubio.i
-
-CLEANFILES = aubio_* SWIGTYPE_* *aubiowrapper* midi_* 
-
-simple_test:
-	javac *.java
-	LD_LIBRARY_PATH=.libs java main 
--- a/java/aubio/main.java
+++ /dev/null
@@ -1,19 +1,0 @@
-// main.java
-
-public class main {
-  static {
-    System.loadLibrary("aubiowrapper");
-  }
-
-  public static void main(String argv[]) {
-    float freq = (float)440.;
-    float midi = aubiowrapper.aubio_freqtomidi( (float)440.);
-    if (midi != (float) 69.0) {
-      throw new Error((String) "Error: aubio_freqtomidi(440.) != 69.", null);
-    }
-    System.out.print(freq);
-    System.out.print(" Hz corresponds to midi note ");
-    System.out.println(midi);
-  }
-}
-