• 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: CoreMIDI driver development questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreMIDI driver development questions


  • Subject: Re: CoreMIDI driver development questions
  • From: Emmett James <email@hidden>
  • Date: Thu, 20 Mar 2003 09:54:55 -0600
  • Mail-followup-to: email@hidden

On Wed, Mar 19, 2003 at 01:07:40PM -0800, rimas wrote:

> i recently wrote a CoreAudio driver for a piece of custom audio hardware we
> have built here at CNMAT. Now I am trying to add support for the MIDI I/O
> that exists in this hardware by writing a CoreMIDI driver.
>
> here's my issue: i've gathered that a MIDI driver needs to be a CFPlugin
> (which the CoreMIDIServer process will load).
>
> so it seems like i need to write a separate piece of code for the MIDI
> driver

Correct.

> (i was hoping i could just have one kernel extension which would
> handle both the MIDI and audio I/O).
>
> However this CFPlugin MIDI driver needs to communicate with the audio
> driver kernel extension i've already written. how can this be accomplished?

Your kext provides the low-level MIDI I/O functionality for your
specific hardware. Your MIDI driver plugin provides an interface
to the CoreMIDIServer, and will communicate with your kext through
an IOUserClient which you will have to write.

So you need to write the MIDI driver, and have it find your kext
by looking through the IORegistry for the IOService of your kext.

You should study Apple's SampleUSBMIDIDriver. The IOServiceClient
class there shows how to ask to receive notifications of the
comings and goings of your kext.

Then you will need to write some IOUserClient code as the
conduit between your MIDI driver and your kext. There is some
documentation on IOUserClients in Apple's doc "Writing an I/O
Kit Device Driver".

Here's a basic block diagram of the whole deal.

---------------------
| MIDI application |
---------------------
^
|
v
---------------------
| CoreMIDIServer |
---------------------
^
|
v
---------------------
| Your MIDI driver |
---------------------
^
|
v
---------------------
| Your IOUserClient |
---------------------
^
|
v
---------------------
| Your kext |
---------------------
^
|
v
---------------------
| Your hardware |
---------------------
_______________________________________________
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: CoreMIDI driver development questions
      • From: Garth Cummings <email@hidden>
References: 
 >CoreMIDI driver development questions (From: rimas <email@hidden>)

  • Prev by Date: Newbie (sort of...)
  • Next by Date: Re: Calling TellListener & AUParameterSet in audio thread
  • Previous by thread: CoreMIDI driver development questions
  • Next by thread: Re: CoreMIDI driver development questions
  • Index(es):
    • Date
    • Thread