Re: More MIDIServer questions
Re: More MIDIServer questions
- Subject: Re: More MIDIServer questions
- From: Doug Wyatt <email@hidden>
- Date: Mon, 3 Nov 2008 14:02:27 -0800
On Nov 3, 2008, at 13:27 , Ethan Funk wrote:
I am still trying to get an understanding of what the MIDIServer
limitations are. My primary problem is that I would like to use
CoreMIDI from with in a daemon process that launches at run time.
As it is now, there is some problem with the bootstrap at launch
time not being a user bootstrap, so CoreMIDI can't run MIDIServer.
I would really like to understand what is going on here so I can try
to find a way to make something work for my software.
1. If I run an app that used CoreMIDI in one user account and then
switch users and run another CoreMIDI app, a second MIDIServer
instance seams to be created, one for each user. This makes sense,
but I am not sure if the switched out MIDIServer is still "active"
while it is switched out. The switched out user app seams to stop
responding to MIDI. Is this to allow the new, switched in user to
get exclusive access to the hardware?
yes
2. What if the two MIDIServer instances are trying to use different
drivers/hardware? I don't have an extra MIDI interface to try this
myself.
Nothing is different -- only the active "console" user's MIDIServer
will run its drivers (though actually it just stops/resumes the
drivers when it sees the fast-user-switch notifications.)
3. If I attempt to use the CFPlugin framework to have my daemon talk
directly with the MIDI hardware drivers (yuck!) that are available,
will there be a problem if a MIDIServer running for a logged in user
is trying to use this driver at the same time? Will this depend on
the underlying IO structure of the driver?
In the case of USB, there will be IOKit-level conflicts. Also, drivers
assume they're being loaded by a MIDIServer that they can talk back to
via CoreMIDIServer.framework.
4. I noticed that launching my daemon with SystemStarter from a
logged in user account in the Terminal application causes the
MIDIServer to run for my daemon, only it is running under the logged
in user account. I have no idea what this means, but I might be
able to use it somehow?
That sounds promising. The question is whether the MIDIServer you get
via this mechanism is running in the correct bootstrap namespace. I
don't know. Here is some reading and a tool that will help you answer
that question.
TN2083: Daemons and Agents
http://developer.apple.com/technotes/tn2005/tn2083.html
TN2228: Running At Login
http://developer.apple.com/technotes/tn2008/tn2228.html#SECBOOTSTRAPNAMESPACE
BootstrapDump:
http://developer.apple.com/samplecode/BootstrapDump/index.html
I'm desperately trying to get a MIDI machine control interface
working for my internet radio automation system.
hth
Doug
_______________________________________________
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