Re: Java Core MIDI - virtual endpoints bugged?
Re: Java Core MIDI - virtual endpoints bugged?
- Subject: Re: Java Core MIDI - virtual endpoints bugged?
- From: Bill Stewart <email@hidden>
- Date: Thu, 31 Jul 2003 00:34:21 -0700
Yes - I have fixed this bug - unfortunately, there isn't a workaround
for it that I can see, but we are going to have a new CAJava in the
next Java update that will both fix this bootclasspath problem and this
and other bugs that have been reported
If you (or anyone else) needs to get a version to develop with before
then, then please email me privately, and I'll send you a copy...
Bill
On Wednesday, July 30, 2003, at 11:58 PM, Ilya Maykov wrote:
Hey everyone,
I've ran into some trouble while trying to use virtual endpoints with
the Java Core MIDI API. For some reason, the program throws
NullPointerExceptions every time the virtual endpoint gets MIDI data.
However, given the poor quality of the Java Core MIDI API, I decided to
see if the problem was Java-specific, and surely enough, the same code
works when written in C. Here is a snippet of the malfunctioning Java
code:
...
client = new MIDIClient(new CAFString("Virtual endpoint test client"),
null);
v_endpoint = client.destinationCreate(new CAFString("VDest0"), new
VirtualMIDIReadProc());
...
private class VirtualMIDIReadProc implements MIDIReadProc
{
public void execute(MIDIInputPort inputPort, MIDIEndpoint endPoint,
MIDIPacketList packetList)
{
System.out.println("MIDI Data received.");
}
}
}
...
As you can see, it doesn't do much, just creates a virtual destination
that can receive data, and every time the data is received, it prints a
message to the console. Here is the exception that gets thrown:
java.lang.NullPointerException
at
com.apple.audio.midi.MIDIDispatcher.readProc(MIDIDispatcher.java:93)
So ... what the hell??? Either I'm doing something wrong, or the Java
version of the Core MIDI API is bugged! If anybody has a clue, please
let me know. In the meanwhile, I will try to figure it out on my own,
and thanks for the help in advance.
Ilya Maykov
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.