java coremidi property advice needed
java coremidi property advice needed
- Subject: java coremidi property advice needed
- From: John Pitcairn <email@hidden>
- Date: Fri, 8 Jul 2005 00:37:22 +1200
I'm still on training wheels in java/coremidi, and could do with a
nudge - specifically, I'm having trouble figuring out if property
names should be identical in java vs C - for instance this:
import com.apple.audio.*;
import com.apple.audio.midi.*;
import com.apple.audio.util.*;
[...]
private int n;
private CAFString idprop;
private MIDIDevice device;
[...]
idprop = new CAFString("kMIDIPropertyUniqueID");
n = MIDIDevice.getNumberOfDevices();
post(n + " devices found:\n");
for (int i = 0; i < n; ++i)
{
device = MIDIDevice.getDevice(i);
try
{
int uid = device.getProperty(idprop);
post("id = " + uid + "\n");
}
catch(CAException e)
{
post(e.toString() + "\n");
}
}
is finding the devices but barfing on the property:
5 devices found:
com.apple.audio.CAException[JCoreAudio:1.3.011],-10835=kMIDIUnknownProperty
com.apple.audio.CAException[JCoreAudio:1.3.011],-10835=kMIDIUnknownProperty
com.apple.audio.CAException[JCoreAudio:1.3.011],-10835=kMIDIUnknownProperty
com.apple.audio.CAException[JCoreAudio:1.3.011],-10835=kMIDIUnknownProperty
com.apple.audio.CAException[JCoreAudio:1.3.011],-10835=kMIDIUnknownProperty
Any advice appreciated.
--
John Pitcairn
--------------------------------------------------------------------------
Revolver Design | Opus Locus | Auckland, New Zealand
--------------------------------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden