Java MIDISetup.getNumberOfSources hangs
Java MIDISetup.getNumberOfSources hangs
- Subject: Java MIDISetup.getNumberOfSources hangs
- From: Scott Ruda <email@hidden>
- Date: Thu, 9 Aug 2001 19:59:00 -0700
Sorry if this has been covered before...
I am trying to use the Java interface to the OS X MIDI services and
using the MIDIGraph application as a template. When I call
MIDISetup.getNumberOfSources the application hangs. I have tried
stepping into the call and it gets way down in internal code and I can't
figure out exactly what is hanging. Any ideas?
I am using a MidiSport 2x2 USB interface and the latest OS X driver
posted at their site. I am able to get it to work if I use the C
interface (using the 'echo' application as a template).
On a related subject, I am unable to access the device using the Sun
MIDI classes. Is there a driver that enables that device for I/O from
within those interfaces? I think I would prefer to use the Sun API since
that <should> be cross-platform on all Java2 platforms (I need to
support Win* also ;-(). Is there an Apple recommendation on which API to
use and why?
I am currently shipping my product using a JNI interface to MIDI (it
abstracts OMS and MM System using a common API in shared libraries), and
probably going to implement a Factory type interface to dynamically
choose an appropriate transport to support Java2, OS 9/X and Win, so I
could use the Apple API if I had to, but it would be simpler to simply
switch between the JNI interface for OS 9 and the Sun Java2 MIDI
interface for all others. Any suggestions are appreciated.
Thanks,
Scott