Re: java coremidi property advice needed
Re: java coremidi property advice needed
- Subject: Re: java coremidi property advice needed
- From: William Stewart <email@hidden>
- Date: Thu, 7 Jul 2005 12:41:36 -0700
com.apple.audio.midi.MIDIConstants.java
- this has a collection of static const strings for these. For example:
public final static CAFString kMIDIPropertyUniqueID = new
CAFString("uniqueID");
Bill
On 07/07/2005, at 11:45 AM, Doug Wyatt wrote:
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
--
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
________________________________________________________________________
__
_______________________________________________
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