Re: Java MIDISetup.getNumberOfSources hangs
Re: Java MIDISetup.getNumberOfSources hangs
- Subject: Re: Java MIDISetup.getNumberOfSources hangs
- From: Doug Wyatt <email@hidden>
- Date: Fri, 10 Aug 2001 01:59:37 -0700
On Thursday, August 9, 2001, at 07:59 PM, Scott Ruda wrote:
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 suspect this is the first MIDI call you're making?
The CoreMIDI framework implements the API on the client app side by
launching a MIDIServer process and using Mach IPC to communicate with
it. There have been some interesting issues with Java and the
CoreFoundation classes which CoreMIDI uses for Mach messaging.
Bill Stewart may have some more specific suggestions, but I believe the
trick is to find a way to make your first MIDI call from Java's main
thread.
Doug
--
Doug Wyatt
work: email@hidden (CoreAudio)
personal: email@hidden
http://www.sonosphere.com
"Premature optimization is the root of all evil."
-- Knuth