• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: java coremidi property advice needed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: java coremidi property advice needed
      • From: William Stewart <email@hidden>
References: 
 >java coremidi property advice needed (From: John Pitcairn <email@hidden>)

  • Prev by Date: Re: Audio Unit with variable Latency (user-modifyable)
  • Next by Date: Getting exact playout time of audio buffers in GarageBand
  • Previous by thread: java coremidi property advice needed
  • Next by thread: Re: java coremidi property advice needed
  • Index(es):
    • Date
    • Thread