Re: java coremidi property advice needed
Re: java coremidi property advice needed
- Subject: Re: java coremidi property advice needed
- From: Doug Wyatt <email@hidden>
- Date: Thu, 7 Jul 2005 11:45:59 -0700
Write a C program that links against CoreMIDI and for each property
constant, prints the CFString's.
For example, kMIDIPropertyUniqueID has the value "uniqueID".
Maybe there's a more elegant way, but that's the brute-force solution.
--
Doug Wyatt
Core Audio, Apple
On Jul 7, 2005, at 5:37, John Pitcairn wrote:
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:
40apple.com
This email sent to email@hidden
_______________________________________________
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