Using OMS from Carbon under OS9
Using OMS from Carbon under OS9
- Subject: Using OMS from Carbon under OS9
- From: Jeff Evans <email@hidden>
- Date: Thu, 24 Oct 2002 11:55:56 -0700
As a matter of possibly general interest: I've been trying to set up a way
that a Carbon app can access OMS MIDI routines when running under OS9. Under
OSX of course it uses CoreMIDI, but there is the problem of 9 remaining.
QuickTime can no longer be used for MIDI input. OMS, however, is not
compatible with Carbon.
A list member has described a method of using OMS; he gets pointers to
NewRoutineDescriptor and DisposeRoutineDescriptor from the InterfaceLib,
using GetSharedLibrary. As for CallUniversalProc, much used by OMS and not
present in Carbon, that gets implemented in Codewarrior's MNU Carbon.lib;
linking to that and including MetroNubUtils.c in the project makes
CallUniversalProc available to OMS. OMSNewHandleClear() also has to be
avoided because it attempts to allocate a block in the system heap. The
project including OMS code then compiles and even launches.
But here's the problem: some critical OMS routines cannot be used. One
can call OMSVersion() and even OMSSignIn(), but an attempt to use
OMSOpenConnections() produces a horrible crash of the mouse-freeze type.
Questions:
(1) Does anyone know of a reliable way that OMS can run under Carbon, or
is OMS MIDI under OS9 just out of the question for a Carbon app?
(2) I wonder if this crash has something to do with a fact mentioned
earlier on this list, that InterfaceLib and Carbon do not belong together?
While the InterfaceLib is not entirely linked by the above technique, part
of it is.
(3) Perhaps this crash could have something to do with the system heap
problem? Surely OMS would want to use its own OMSNewHandle() when making a
node list, which would attempt to allocate the memory in the system heap and
would fail.
And a request: Solving the MIDI problem for OS9 is pretty important for
apps that have a large customer base still using 9 but want to become
compatible with X. It would be great if Apple could provide some sample
code for accomplishing this trick - with the author of OMS present at Apple
perhaps this is not too unreasonable a hope?
Thanks, Jeff Evans
_______________________________________________
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.