[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] Patch: start of ALSA MIDI provider code
From: |
Anthony Green |
Subject: |
Re: [cp-patches] Patch: start of ALSA MIDI provider code |
Date: |
Sun, 02 Oct 2005 17:10:58 -0700 |
This patch takes care of many of your comments, but not all.
It also adds a DSSI[1] provider. With this I was able to, in a few
lines of Java code, connect my external MIDI keyboard to a DSSI
soft-synth wired to jack[2] audio output and play music. There's still
lots to do, but this is a nice milestone.
If this patch isn't acceptable for the cvs trunk, would it be OK if I
checked this into a new cvs branch? I feel uncomfortable keeping all
this local.
Thanks,
AG
[1] http://dssi.sourceforge.net
[2] http://jackit.sourceforge.net
2005-10-02 Anthony Green <address@hidden>
* native/jni/Makefile.am: Maybe build ALSA code.
Maybe build DSSI code.
* gnu/javax/sound/midi/alsa/AlsaPortDevice.java,
gnu/javax/sound/midi/alsa/AlsaOutputPortDevice.java
gnu/javax/sound/midi/alsa/AlsaInputPortDevice.java
gnu/javax/sound/midi/alsa/AlsaMidiDeviceProvider.java
gnu/javax/sound/midi/alsa/AlsaMidiSequencerDevice.java: Rebuilt.
native/jni/midi-alsa/gnu_javax_sound_midi_alsa_AlsaPortDevice.c,
native/jni/midi-alsa/gnu_javax_sound_midi_alsa_AlsaMidiDeviceProvider.c,
native/jni/midi-alsa/gnu_javax_sound_midi_alsa_AlsaSequencerDevice.c,
native/jni/midi-dssi/dssi_data.h, native/jni/midi-dssi/Makefile.am,
native/jni/midi-dssi/gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider.c
native/jni/midi-dssi/gnu_javax_sound_midi_dssi_DSSISynthesizer.c,
native/jni/midi-alsa/Makefile.am: New files.
* include/Makefile.am: Add sound header files.
* include/gnu_javax_sound_midi_alsa_AlsaPortDevice.h,
include/gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider.h
include/gnu_javax_sound_midi_dssi_DSSISynthesizer.h
include/gnu_javax_sound_midi_alsa_AlsaMidiDeviceProvider.h,
include/gnu_javax_sound_midi_alsa_AlsaSequencerDevice.h: New
files.
* configure.ac (AC_CONFIG_FILES): Add
native/jni/midi-alsa/Makefile, native/jni/midi-dssi/Makefile.
Index: configure.ac
===================================================================
RCS file: /cvsroot/classpath/classpath/configure.ac,v
retrieving revision 1.108
diff -u -r1.108 configure.ac
--- configure.ac 17 Sep 2005 21:19:35 -0000 1.108
+++ configure.ac 3 Oct 2005 00:00:22 -0000
@@ -103,6 +103,32 @@
AM_CONDITIONAL(CREATE_XMLJ_LIBRARY, test "x${COMPILE_XMLJ}" = xyes)
dnl -----------------------------------------------------------
+dnl ALSA code (enabled by default)
+dnl -----------------------------------------------------------
+AC_ARG_ENABLE([alsa],
+ [AS_HELP_STRING(--disable-alsa,compile ALSA providers (enable by
--enable-alsa) [default=yes])],
+ [case "${enableval}" in
+ yes) COMPILE_ALSA=yes ;;
+ no) COMPILE_ALSA=no ;;
+ *) COMPILE_ALSA=yes ;;
+ esac],
+
[AC_CHECK_HEADERS([alsa/asoundlib.h],COMPILE_ALSA=yes,COMPILE_ALSA=no)])
+AM_CONDITIONAL(CREATE_ALSA_LIBRARIES, test "x${COMPILE_ALSA}" = xyes)
+
+dnl -----------------------------------------------------------
+dnl DSSI code (enabled by default)
+dnl -----------------------------------------------------------
+AC_ARG_ENABLE([alsa],
+ [AS_HELP_STRING(--disable-dssi,compile DSSI providers (enable by
--enable-dssi) [default=yes])],
+ [case "${enableval}" in
+ yes) COMPILE_DSSI=yes ;;
+ no) COMPILE_DSSI=no ;;
+ *) COMPILE_DSSI=yes ;;
+ esac],
+ [AC_CHECK_HEADERS([dssi.h],COMPILE_DSSI=yes,COMPILE_DSSI=no)])
+AM_CONDITIONAL(CREATE_DSSI_LIBRARIES, test "x${COMPILE_DSSI}" = xyes)
+
+dnl -----------------------------------------------------------
dnl GTK native peer (enabled by default)
dnl -----------------------------------------------------------
AC_ARG_ENABLE([gtk-peer],
@@ -489,6 +515,9 @@
native/jni/gtk-peer/Makefile
native/jni/qt-peer/Makefile
native/jni/xmlj/Makefile
+native/jni/midi-alsa/Makefile
+native/jni/midi-dssi/Makefile
native/target/Makefile
native/target/Linux/Makefile
native/target/generic/Makefile
Index: include/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/include/Makefile.am,v
retrieving revision 1.48
diff -u -r1.48 Makefile.am
--- include/Makefile.am 5 Sep 2005 08:31:03 -0000 1.48
+++ include/Makefile.am 3 Oct 2005 00:00:22 -0000
@@ -6,6 +6,13 @@
ARG_CLASSPATH_JAVAH = -bootclasspath
JAVAH = $(USER_JAVAH) $(ARG_JNI_JAVAH) $(ARG_CLASSPATH_JAVAH)
../lib:$(USER_CLASSLIB)
+SOUND_H_FILES = \
+$(top_srcdir)/include/gnu_javax_sound_midi_alsa_AlsaPortDevice.h \
+$(top_srcdir)/include/gnu_javax_sound_midi_alsa_AlsaMidiSequencerDevice.h \
+$(top_srcdir)/include/gnu_javax_sound_midi_alsa_AlsaMidiDeviceProvider.h \
+$(top_srcdir)/include/gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider.h \
+$(top_srcdir)/include/gnu_javax_sound_midi_dssi_DSSISynthesizer.h
+
XMLJ_H_FILES = \
$(top_srcdir)/include/gnu_xml_libxmlj_dom_GnomeDocument.h \
$(top_srcdir)/include/gnu_xml_libxmlj_dom_GnomeXPathNodeList.h \
@@ -105,6 +112,7 @@
$(top_srcdir)/include/gnu_java_awt_peer_qt_QtEmbeddedWindowPeer.h
H_FILES = \
+$(SOUND_H_FILES) \
$(XMLJ_H_FILES) \
$(GTKPEER_H_FILES) \
$(QTPEER_H_FILES) \
@@ -148,6 +156,12 @@
$(top_srcdir)/include/gnu_java_awt_peer_qt_%.h:
$(top_builddir)/lib/gnu/java/awt/peer/qt/%.class
$(JAVAH) -o $@ gnu.java.awt.peer.qt.$*
+
+$(top_srcdir)/include/gnu_javax_sound_midi_alsa_%.h:
$(top_builddir)/lib/gnu/javax/sound/midi/alsa/%.class
+ $(JAVAH) -o $@ gnu.javax.sound.midi.alsa.$*
+
+$(top_srcdir)/include/gnu_javax_sound_midi_dssi_%.h:
$(top_builddir)/lib/gnu/javax/sound/midi/dssi/%.class
+ $(JAVAH) -o $@ gnu.javax.sound.midi.dssi.$*
$(top_srcdir)/include/gnu_java_net_PlainDatagramSocketImpl.h:
$(top_srcdir)/gnu/java/net/PlainDatagramSocketImpl.java
$(JAVAH) -o $@ gnu.java.net.PlainDatagramSocketImpl
Index: native/jni/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/Makefile.am,v
retrieving revision 1.15
diff -u -r1.15 Makefile.am
--- native/jni/Makefile.am 5 Sep 2005 18:41:33 -0000 1.15
+++ native/jni/Makefile.am 3 Oct 2005 00:00:30 -0000
@@ -4,6 +4,14 @@
JNIDIRS = java-io java-lang java-net java-nio java-util
endif
+if CREATE_ALSA_LIBRARIES
+ ALSADIR = midi-alsa
+endif
+
+if CREATE_DSSI_LIBRARIES
+ DSSIDIR = midi-dssi
+endif
+
if CREATE_GTK_PEER_LIBRARIES
GTKDIR = gtk-peer
endif
@@ -16,9 +24,10 @@
XMLJDIR = xmlj
endif
-SUBDIRS = classpath $(JNIDIRS) $(GTKDIR) $(CLASSPATH_QT_PEER_DIR) $(XMLJDIR)
+SUBDIRS = classpath $(JNIDIRS) \
+ $(ALSADIR) $(DSSIDIR) $(GTKDIR) $(CLASSPATH_QT_PEER_DIR) $(XMLJDIR)
DIST_SUBDIRS = classpath java-io java-lang java-net java-nio java-util \
- gtk-peer qt-peer xmlj
+ gtk-peer qt-peer xmlj midi-alsa midi-dssi
all-local:
cd $(top_srcdir) && $(SHELL) ./scripts/check_jni_methods.sh
midi-new-files.tar.bz2
Description: application/bzip-compressed-tar