• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: MIDIOutputPortCreate returning a odd MIDIPortRef
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MIDIOutputPortCreate returning a odd MIDIPortRef


  • Subject: Re: MIDIOutputPortCreate returning a odd MIDIPortRef
  • From: Pete Gontier <email@hidden>
  • Date: Mon, 07 Jun 2004 10:04:55 -0700

circa 6/5/04 3:46, p3consulting <email@hidden> wrote:

>>> I know MIDIPortRef is an opaque type but opaque to the point to be an
>>> odd address seems quite strange to me !?

>> Yes. It's just a number. Today they happen to start at 0x9810000.
>> Tomorrow they might look different.

> If MIDIPortRef is just a reference number it should be something like
>
> unsigned MIDIPortRef ;
>
> or better yet
>
> unsigned MIDIPortID ;

There is a good reason for such things to be declared as pointers to
incomplete structs, and that is that most C-like languages are too stupid to
allow one to define a distinct integral type (short of burying it in a
struct). I also like the Ref suffix better than the ID suffix because ID
reveals detail I don't want.

> Are they other xxxxRef in MIDI that are not the pointer they "pretend"
> to be ?

Probably. This paradigm is used all over the Mac OS API these days. That's
why there are accessor functions and high-level debugger plug-ins which call
them. (I don't know if there is a debugger plug-in for CoreMIDI.)

--

Pete Gontier
http://www.m-audio.com/
_______________________________________________
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.


References: 
 >Re: MIDIOutputPortCreate returning a odd MIDIPortRef (From: p3consulting <email@hidden>)

  • Prev by Date: 10.3.4 and SoundFlower
  • Next by Date: Re: 10.3.4 and SoundFlower
  • Previous by thread: Re: MIDIOutputPortCreate returning a odd MIDIPortRef
  • Next by thread: Re: MIDIOutputPortCreate returning a odd MIDIPortRef
  • Index(es):
    • Date
    • Thread