Re: CoreMIDI problem
Re: CoreMIDI problem
- Subject: Re: CoreMIDI problem
- From: Doug Wyatt <email@hidden>
- Date: Mon, 22 May 2006 12:49:51 -0700
The MIDISendSysex function's implementation is entirely on the client
side (not in the server ... well, actually there's a duplicate
implementation in the server, but that's only for drivers). This
implementation actually creates its own private client and output
port, which is why disposing your own port and client have no effect.
One strategy would be to set the MIDISysexSendRequest's complete flag
to true, to signify that you wish to abort. Then wait for your
completion function to be called (which will occur on a separate
thread owned by the implementation). At this point you can be sure
your completion function won't be called any more.
It may be simpler and more robust to maintain a global indicating
whether your completion function should do anything when it's called.
Doug
On May 22, 2006, at 07:54 , Stéphane Letz wrote:
Hi,
We have an application that use the "MIDISendSysex" function and
the send callback completion mechanism to send big sysex. We may
have cases when the application quits while a sysex has not been
completely sent. Although we desallocate CoreMidi ressources using
"MIDIPortDispose" and "MIDIClientDispose", it seems that the
completion callback is still called afterward.
What is the recommended way of dealing with this case? Should our
"Stop" function wait until all completion callback have been
called? (And if yes how?)
or is there a way to dispose Midi ressources and be sure that the
completion routine will not be called anymore?
Thanks
Stephane Letz
--
Doug Wyatt
Core Audio, Apple
_______________________________________________
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