• 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: question about CoreMIDI & cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question about CoreMIDI & cocoa


  • Subject: Re: question about CoreMIDI & cocoa
  • From: Robert Grant <email@hidden>
  • Date: Tue, 28 Sep 2004 20:09:50 -0400


On Sep 28, 2004, at 5:31 PM, john wrote:

Hi Khamba,

I've never used CoreMIDI, but I am familiar with calling ObjC methods from C callbacks and I do find it rather trivial. Maybe Robert is referring to some other aspect since I know nothing about CoreMIDI. In any case I'm sure checking out the MIDIMonitor source will be very helpful overall.


Hi John,

Certainly calling Obj-C methods from C code is not a problem - it's the thread communication that's the problem as AppKit is not generally thread-safe.

I seem to remember getting spanked over using the approach the Shaun suggests (performSelectorOnMainThread) as it allocates memory which can block the MIDI thread (perhaps I'm mis-remembering) - various non-blocking queueing mechanisms were then discussed - it's all in the archives.

Anyway - for most apps performSelectorOnMainThread will do the job - IMHO (which I would have suggested if I had not gone through the spanking before ;-))

Robert.

_______________________________________________
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: question about CoreMIDI & cocoa
      • From: john <email@hidden>
References: 
 >question about CoreMIDI & cocoa (From: Khamba Staring <email@hidden>)
 >Re: question about CoreMIDI & cocoa (From: Robert Grant <email@hidden>)
 >Re: question about CoreMIDI & cocoa (From: john <email@hidden>)

  • Prev by Date: Re: How to check if a system has an audio input?
  • Next by Date: Re: question about CoreMIDI & cocoa
  • Previous by thread: Re: question about CoreMIDI & cocoa
  • Next by thread: Re: question about CoreMIDI & cocoa
  • Index(es):
    • Date
    • Thread