Re: Error -10838 calling MIDIClientCreate
Re: Error -10838 calling MIDIClientCreate
- Subject: Re: Error -10838 calling MIDIClientCreate
- From: "Marco Hinic" <email@hidden>
- Date: Thu, 29 Sep 2005 18:55:11 +0200
>On Sep 27, 2005, at 6:04, Marco Hinic wrote:
>> We can reproduce an error -10838 calling MIDIClientCreate.
>>
>> When our application switch to full screen we reinitialize our
>> engine by
>> closing and reopening it, so we close and open the MIDI driver.
>>
>> The funny thing is that if there is less than 10 seconds between the
>> MIDIClientDispose and MIDIClientCreate we have no problems and if the
>> application spend more than 10 seconds loading visuals we have this
>> error -10838...
>>
>> I can reproduce this by inserting a sleep(10) before opening the
>> MIDI driver.
>>
>> Also I see this in the console:
>>
>> 2005-09-27 14:52:03.602 ArKaos Mach-O Debug[458] CFLog (0):
>> CFMessagePort: bootstrap_register(): failed 1103 (0x44f), port =
>> 0x7587,
>> name = 'Apple MIDI Client 458'
>> See /usr/include/servers/bootstrap_defs.h for the error codes.
>> 2005-09-27 14:52:03.605 ArKaos Mach-O Debug[458] CFLog (99):
>> CFMessagePortCreateLocal(): failed to name Mach port (Apple MIDI
>> Client 458)
>>
>> We can solve this by moving the code that open the MIDI driver earlier
>> in our startup code but this is definitively strange.
>>
>> I will fill a bug report for this on the apple bug reporter.
>>
>> Any thoughts?
>
>This is fallout from a change I made for a driver developer who
>wanted a way to be able to keep a client process running while
>letting the MIDIServer quit when the process disposes its last
>client. I'm surprised that you found this apparent bug in the way the
>client side is re-initializing itself before they did...
>
>Is it practical for you to only create the MIDI client once, and not
>dispose and re-create it?
I did implement this today in our application and it does the trick.
I just call MIDIClientCreate once in the lifetime of the application and
I use MIDIInputPortCreate / MIDIPortDispose when I need to restart our engine.
Thanks for your help!
-----------------------------------------------------------
Marco Hinic (email@hidden)
ArKaos engine architect & CEO
http://www.arkaos.net
In cyberspace nobody knows you're a cat
-----------------------------------------------------------
_______________________________________________
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