Re: MIDIOutputPortCreate returning a odd MIDIPortRef
Re: MIDIOutputPortCreate returning a odd MIDIPortRef
- Subject: Re: MIDIOutputPortCreate returning a odd MIDIPortRef
- From: p3consulting <email@hidden>
- Date: Sat, 5 Jun 2004 12:46:26 +0200
The confusing thing is
typedef struct OpaqueMIDIPort * MIDIPortRef;
in MIDIServices.h, this declaration pretends MIDIPortRef is an
address...
If MIDIPortRef is just a reference number it should be something like
unsigned MIDIPortRef ;
or better yet
unsigned MIDIPortID ;
The comments in the header add to the confusion,
from MIDIServices.h:
/*!
@typedef MIDIPortRef
@discussion Derives from MIDIObjectRef, owned by a MIDIClientRef.
A MIDIPortRef, which may be an input port or output port,
is an object through which a client may communicate with any
number of MIDI sources or destinations.
*/
and
/*!
@typedef MIDIObjectRef
@discussion MIDIObject is the base class for many of the objects in
CoreMIDI. They have properties, and often an "owner" object,
from which they inherit any properties they do not themselves
have.
I don't know about other developers out there, but my humble opinion is
that the doc
should be updated to reflect the reality...
The less we could expect in the header is a big WARNING...
Are they other xxxxRef in MIDI that are not the pointer they "pretend"
to be ?
Pascal Pochet
email@hidden
----------------------------------
PGP
KeyID: 0x208C5DBF
Fingerprint: 9BFB 245C 5BFE 7F1D 64B7 C473 ABB3 4E83 208C 5DBF
Le juin 4, 2004, ` 22:48, Doug Wyatt a icrit :
>
On Jun 4, 2004, at 1:17, p3consulting wrote:
>
> MIDIOutputPortCreate returning no error but a odd address for the
>
> MIDIPortRef outPort parameter ?
>
>
>
> I know MIDIPortRef is an opaque type but opaque to the point to be an
>
> odd address seems quite strange to me !?
>
>
>
> Is MIDIPortRef really an address ?
>
>
>
> testing under 10.3.4 when no MIDI device are physically connected to
>
> the machine and don't remember to have seen this happening before...
>
> the MIDIClientref returned by MIDIClientCreate is 0x9810010
>
> and the outPort returned by MIDIOutputPortCreate is 0x9810011
>
>
>
> Is this "normal" behavior ?
>
>
Yes. It's just a number. Today they happen to start at 0x9810000.
>
Tomorrow they might look different.
>
>
Doug
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.