• 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: Virtual Endpoint Exception in callback
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Virtual Endpoint Exception in callback


  • Subject: Re: Virtual Endpoint Exception in callback
  • From: marc downie <email@hidden>
  • Date: Fri, 18 Jul 2003 13:29:13 +0100

Hello,

I appear to have the same problem (and a small example). Or, perhaps
I'm missing something:

With the following code:

package marc.sound;

import com.apple.audio.CAException;
import com.apple.audio.midi.*;
import com.apple.audio.util.CAFString;

/**
* @author marc
*/
public class MidiBug {
static public void main(String[] s) {
try {
MIDIClient client= new MIDIClient(new CAFString("MIDIjava"), new
MIDINotifyProc() {
public void execute(MIDIClient arg0, MIDINotification arg1) {
System.out.println(" notification called ");
}
});
MIDIEndpoint dest= client.destinationCreate(new CAFString("hello"),
new MIDIReadProc() {
public void execute(MIDIInputPort arg0, MIDIEndpoint arg1,
MIDIPacketList arg2) {
System.out.println(" read proc called ");
}
});
while (true) {
Thread.sleep(1000);
System.out.println(" still alive...");
}
} catch (Exception e) {
System.out.println(" exception caught");
e.printStackTrace();
}
}
}

then:
java
-Xbootclasspath/a:/System/Library/Frameworks/JavaVM.framework/Classes/
CoreAudioSupport.jar -cp . marc.sound.MidiBug
from the command line.

When I send anything to the destination "hello" (say using the
wonderful little MidiKeys utility). I get:

java.lang.NullPointerException
at
com.apple.audio.midi.MIDIDispatcher.readProc(MIDIDispatcher.java:93)

at the command line. Neither " notification called " or " read proc
called " is ever printed.

off to bugreporter....

kind regards,

marc


On Thursday, July 17, 2003, at 02:23 AM, Bill Stewart wrote:

> The only variable on line 93 of this is your callback that should
> field the input call... Have you added a non-null object to handle the
> input?
>
> Ideally if you can file a bug and include the code I can take a look
> at this...
>
> http://developer.apple.com/bugreporter
>
> Thanks
>
> Bill
>
> On Wednesday, July 16, 2003, at 06:08 PM, email@hidden wrote:
>
>> (Sorry if this hits twice, I left the Subject: line out the first
>> time.)
>>
>> My first post, being new to the list:
>>
>> I'm trying to create a midi filter application: read the input, pass
>> it on or don't according to what's being filtered. I've gotten the
>> basic idea to work using C++ but want to use Java.
>> From what I've seen, virtual endpoints (destinationCreate) are "seen"
>> by MIDIsetup.getSource(), ports (inputPortCreate) are not. I need to
>> use the virtual variety.
>> I'm getting the following error:
>>
>> java.lang.NullPointerException
>> at
>> com.apple.audio.midi.MIDIDispatcher.readProc(MIDIDispatcher.java:93)
>>
>> when I send. Same behavior in 1.3.1 and 1.4.1. Again, the virtual
>> endpoints work fine in C++.
>> Any ideas?
>> Thanks in advance.
>> --
>>
>>
>> -----------------------------------------------------
>> FREE Premium WebMail, like email@hidden
>> Get YourName@ any of 1000+ GREAT .ws "WebSite" Domains!
>> http://e.WS
>> _______________________________________________
>> 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.
_______________________________________________
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.

References: 
 >Re: Virtual Endpoint Exception in callback (From: Bill Stewart <email@hidden>)

  • Prev by Date: use of Groups...
  • Next by Date: Re: Hardware control surfaces (was Re: Private Parameters)
  • Previous by thread: Re: Virtual Endpoint Exception in callback
  • Next by thread: outputLatency?
  • Index(es):
    • Date
    • Thread