• 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
Another Endpoint Q
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Another Endpoint Q


  • Subject: Another Endpoint Q
  • From: Andy <email@hidden>
  • Date: Fri, 6 Sep 2002 23:21:33 +0100

I must say I feel very sad and lonely when no-one answers my Qs ;)

I have another Endpoint related question ...

In a MIDI driver interface, there's a function named MIDIDriverEnableSource (MIDIEndpointRef src, Boolean enabled),
This passes an EndpointRef and a boolean flag.

The documentation and headers are unclear, but it appears that the endpoint ref (src) I'm receiving here does not correspond to any that my driver created on its own ports.
Is that right, is it referring to an external connection ie the endpoint that is on the other end of the ("virtual") line.
Is it a bug ? In my code or CA ?
What should/does this EndpointRef refer to ?





Here's a code extract ...

elsewhere in the code endpoints are created and refcons are set using MIDIEndpointSetRefCons()
also elsewhere I extract the endpoint refcons and use them successfully, but when I receive this notification ...

void ClientNotifyProc(const MIDINotification * message, void *refCon)
{
switch ( message->messageID ) {

...

case kMIDIMsgObjectRemoved :
{
MIDIObjectAddRemoveNotification * marn = (MIDIObjectAddRemoveNotification *) message;
if ( marn->childType == kMIDIObjectType_Source ) {
// child = source endpoint
// parent = port that owns endpoint
printf("MIDI SOURCE REMOVED FROM SETUP parent = X, child = X\n", (int)marn->parent, (int)marn->child);

void * ref1 = 0;
void * ref2 = 0;
USBDevice * usbDevice;
OSStatus err = MIDIEndpointGetRefCons((MIDIEndpointRef)marn->child, &ref1, &ref2);

printf("endpoint rc's 1 = X, 2 = X, err = %d\n", (int)ref1, (int)ref2, (int)err);
}
}
break;
}
}

console output is this ...


MIDI SOURCE REMOVED FROM SETUP parent = 09810012, child = 09810013
endpoint rc's 1 = 00000000, 2 = 00000000, err = -50


Parent and Child values correspond to port and endpoint that were created earlier on.
Why the -50 error, (param error ?)
Is it because the endpoints have already been destroyed and the MIDIEndpointRef (marn->child) is no longer valid ?
_______________________________________________
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.

  • Follow-Ups:
    • Re: Another Endpoint Q
      • From: Herbie Robinson <email@hidden>
  • Prev by Date: Re: MusicSequence.setAUGraph(AUGraph mySynth)
  • Next by Date: CoreMIDI and sudo ...
  • Previous by thread: Re: MusicSequence.setAUGraph(AUGraph mySynth)
  • Next by thread: Re: Another Endpoint Q
  • Index(es):
    • Date
    • Thread