• 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: ReadProc can't use Objective C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ReadProc can't use Objective C


  • Subject: Re: ReadProc can't use Objective C
  • From: Herbie Robinson <email@hidden>
  • Date: Tue, 24 Dec 2002 04:06:43 -0500

It would be a good idea to avoid anything that might garbage collect.

if your MIDIReadProc is implemented in a .m file, then you can use any
objective-c construct. you could use one of the RefCons to pass in
an objective-c object pointer, like

void myReadProc(const MIDIPacketList *pktlist, void *readProcRefCon, void *srcConnRefCon)
{
SomeClass *anObject = readProcRefCon;
[anObject someMessage:pktlist];
}

there's no such thing as "self" or "super" inside your C function, since those
only make sense in a method definition. but you can certainly send messages
to an object, as long as you get your hands on the object in the first place.

-mike


On Monday, December 23, 2002, at 08:33 AM, Craig Bakalian wrote:

Hi,
I have a standard ReadProc set up in a Cocoa app. I need to send the data to a Cocoa Object. The standard C like nature of the readProc can't see an Objective C function like -
[self sendMidiData: (unsigned)tonalValue]. What is a programmer to do?

Craig Bakalian


--
-*****************************************
** http://www.curbside-recording.com/ **
******************************************
_______________________________________________
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: ReadProc can't use Objective C (From: Michael Thornburgh <email@hidden>)

  • Prev by Date: Re: what is the equivalent to VSTi in AU world ?
  • Next by Date: Re: what is the equivalent to VSTi in AU world ?
  • Previous by thread: Re: ReadProc can't use Objective C
  • Next by thread: DLS Synth and 10.2.3
  • Index(es):
    • Date
    • Thread