Re: Blocked in MIDIClientCreate
Re: Blocked in MIDIClientCreate
- Subject: Re: Blocked in MIDIClientCreate
- From: philippe wicker <email@hidden>
- Date: Fri, 16 Dec 2005 09:22:36 +0100
On Dec 15, 2005, at 10:19 PM, Herbie Robinson wrote:
Hi Herbie, thanks for your answer:) More questions follow.....
At 6:50 PM +0100 12/14/05, philippe wicker wrote:
A good place to start to debug this would be to use Shark or
Sampler to get a trace of what MIDIServer is doing when it is
hung. We may or may not get clues about what's happening in the
USB stack from this; I am concerned that you may indeed need to
learn more about what's happening on the USB bus. But a sample of
the hung state would be a good place to start.
I've tried to use Sampler (recording IPC and Locking calls), but I
don't know how to attach the MIDIServer when it is relaunched. If
I attach it when I'm hung in MIDIClientCreate then nothing is
recorded (no activity of MIDIServer?).
Attach it with gdb and get a stack trace (of all the threads).
The difficulty is that the MIDIServer is launched when
MIDIClientCreate is called, so I cannot attach it because I don't
have a PID. Unless there is a trick I'm not aware of?
It's usually pretty obvious at that point (but you may be close to
needing to rent that USB analyzer).
Yeah!! I've already asked my boss to rent such a device....
Another thing that might be useful is that the sample MIDI driver
is a USB class driver. You could build that in debug mode and use
it to help debug your hardware and firmware. I don't know how
close it is to that binaries that ship with the OS, but it's almost
certainly going to be helpful to debug with.
That's a good idea. I had a look at this sample and have some
questions about it:
- in the file SampleUSBMIDI.cpp there's some "things to customize":
-- the UUID: do I need to modify some of the bytes used to generate
the constant kFactoryUUID, and if so how?
-- What is the meaning of kTheInterfaceToUse ? Does it relate to
interface numbers in the USB descriptors?
-- My device descriptors contain a single MIDIStreamingInterface
associated to one embedded jack IN and one embedded jack OUT. Should
I keep the value 2 (1 IN + 1 OUT) for kMyNumPorts constant?
- The USB descriptors of my device are all class compliant (at least
I believe they are....). Will the sample MIDI driver be loaded
instead of the generic MIDI driver? I only set kMyVendorID and
kMyProductID to the values in my descriptors and installed the sample
driver in ~/Library/Audio/MIDI Drivers.
Sorry for these numerous questions but I knew nearly nothing about
USB standard and drivers before starting this project. Starting with
a totally new audio and midi device is probably not the simplest way
to get familiar with all that stuff :)
--
-*****************************************
** http://www.curbside-recording.com/ **
******************************************
_______________________________________________
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