Re: CoreMIDI driver development questions
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.