Re: [AD] OSX qtmidi.m build failure fix

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 4/14/06, Miguel A. Gavidia <juvinious@xxxxxxxxxx> wrote:
> This seems to be a problem, I'd imagine you are using a PPC mac?
> I had originally changed it because peterhull suggested that should work on
> PPC as well as x86 hardware.
Hmm, what _I've_ got is this:
      note_request.info.polyphony = EndianU16_NtoB(8);
      note_request.info.typicalPolyphony = EndianS32_NtoB(X2Fix(1.0));
Does that not work for either of you?

If you look in Endian.h (it's buried deep within the CoreServices
framework, best bet is to search for it with Finder!) there is code
like this
/*
   These types are used for structures that contain data that is
   always in BigEndian format.  This extra typing prevents little
   endian code from directly changing the data, thus saving much
   time in the debugger.
*/

#if TARGET_RT_LITTLE_ENDIAN
... snip ...
struct BigEndianShort {
  short               bigEndianValue;
};
typedef struct BigEndianShort           BigEndianShort;
..snip...
#else
...snip...
typedef short                           BigEndianShort;
...snip...
#endif  /* TARGET_RT_LITTLE_ENDIAN */

i.e it's a struct for Intel folks and a simple typedef for the rest of
us. This explains Ultio's problem. But casting a pointer to short* -
doesn't that destroy whatever the Apple programmers were trying to
achieve by wrapping the value in a struct?

Can you both try what I put above and see if that doesn't work; also
if there are problems, can you check Endian.h and see if those
definitions have been altered.

Thanks a lot,

Pete




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/