summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2012-10-26 07:32:20 +0100
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2012-10-26 07:32:20 +0100
commit62326a864cc2418a979e2334033fc0dac7caeed5 (patch)
tree9273fb13170e140a577fe4aa30fb66a01b291d54
parentdb494a9e7dc40d439a772fc4f10a2392837b9cf4 (diff)
downloadclasspath-62326a864cc2418a979e2334033fc0dac7caeed5.tar.gz
Use jack_client_open rather than deprecated jack_client_new.
2012-10-26 Andrew John Hughes <gnu_andrew@member.fsf.org> * native/jni/midi-dssi/gnu_javax_sound_midi_dssi_DSSISynthesizer.c: (Java_gnu_javax_sound_midi_dssi_DSSISynthesizer_open_1(JNIEnv*, jclass, jlong)): Use jack_client_open instead of deprecated jack_client_new. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
-rw-r--r--ChangeLog7
-rw-r--r--native/jni/midi-dssi/gnu_javax_sound_midi_dssi_DSSISynthesizer.c15
2 files changed, 17 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index f78f39328..f26209ebe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-10-26 Andrew John Hughes <gnu_andrew@member.fsf.org>
+
+ * native/jni/midi-dssi/gnu_javax_sound_midi_dssi_DSSISynthesizer.c:
+ (Java_gnu_javax_sound_midi_dssi_DSSISynthesizer_open_1(JNIEnv*,
+ jclass, jlong)): Use jack_client_open instead of
+ deprecated jack_client_new.
+
2012-10-15 Andrew John Hughes <gnu_andrew@member.fsf.org>
* configure.ac: Set to 0.99.1pre, as
diff --git a/native/jni/midi-dssi/gnu_javax_sound_midi_dssi_DSSISynthesizer.c b/native/jni/midi-dssi/gnu_javax_sound_midi_dssi_DSSISynthesizer.c
index ec1477ec8..55881bef8 100644
--- a/native/jni/midi-dssi/gnu_javax_sound_midi_dssi_DSSISynthesizer.c
+++ b/native/jni/midi-dssi/gnu_javax_sound_midi_dssi_DSSISynthesizer.c
@@ -283,15 +283,20 @@ JNIEXPORT void JNICALL
Java_gnu_javax_sound_midi_dssi_DSSISynthesizer_open_1
(JNIEnv *env, jclass clazz __attribute__((unused)), jlong handle)
{
- unsigned int port_count, j, cindex;
+ unsigned int port_count, j, cindex, ret;
const char **ports;
int controller = 0;
dssi_data *data = (dssi_data *) (long) handle;
- if ((data->jack_client = jack_client_new (data->desc->LADSPA_Plugin->Label)) == 0)
+ jack_status_t status;
+ char buffer[31];
+
+ if ((data->jack_client = jack_client_open (data->desc->LADSPA_Plugin->Label,
+ JackUseExactName, &status)) == 0)
{
- /* JCL_ThrowException (env, "javax/sound/midi/MidiUnavailableException", */
- JCL_ThrowException (env, "java/io/IOException",
- "can't create jack client");
+ ret = snprintf(buffer, 31, "can't create jack client: %4d", status);
+ assert (ret == 30);
+ JCL_ThrowException (env, "javax/sound/midi/MidiUnavailableException",
+ buffer);
return;
}