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

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


On Saturday 15 April 2006 16:41, Peter Hull wrote:
> OK, I am wrong and you are (both) right - I emailed
> quicktime-api@xxxxxxxxxx and got a reply from one of their
> engineers. The solution* is either to do the *(short*)&whatever as
> Ultio suggested, _or_ to put in a conditional as Juvinious suggested.
>
> However, they recommend using the constant TARGET_RT_BIG_ENDIAN rather
> that __i386__, so I suggest the following patch against the current
> svn
>
> Index: src/macosx/qtmidi.m
> ===================================================================
> --- src/macosx/qtmidi.m (revision 5778)
> +++ src/macosx/qtmidi.m (working copy)
> @@ -125,7 +125,7 @@
>        voice[i].vol = -1;
>        voice[i].pan = -1;
>        memset(&note_request, 0, sizeof(note_request));
> -      #ifndef __i386__
> +      #if TARGET_RT_BIG_ENDIAN
>         note_request.info.polyphony = 8;
>         note_request.info.typicalPolyphony = 0x00010000;
>        #else
>
> Please could someone check this?
>
> Pete
>
> * Have a look at the top of qtmusic.c in
> http://developer.apple.com/samplecode/qtmusic/qtmusic.html
>
> On 4/14/06, Peter Hull <peterhull90@xxxxxxxxxx> wrote:
> > I just don't think that's the best way to do it. Please can someone
> > test what I wrote in my previous email.
> >
> > EndianU16_NtoB() and friends are _designed_ to overcome differences in
> > processors, it seems unnecessary to be wrapping things in #ifdefs.
> >
> > Pete
> >
> > On 4/14/06, Elias Pschernig <elias@xxxxxxxxxx> wrote:
> > > On Fri, 2006-04-14 at 17:21 +0800, Miguel A. Gavidia wrote:
> > > > On Friday 14 April 2006 07:13, Jay Bernardo wrote:
> > > > > This is my first attempt at flagging something as broken and
> > > > > supplying a patch to fix it. If I improperly followed procedure,
> > > > > please let me know.
> > > > >
> > > > > When building Allegro for MacOS X from the 4.2 branch (revision
> > > > > 5777) the following errors occur:
> > > > >
> > > > > src/macosx/qtmidi.m: In function 'osx_midi_init':
> > > > > src/macosx/qtmidi.m:128: error: request for member 'bigEndianValue'
> > > > > in something not a structure or union
> > > > > src/macosx/qtmidi.m:129: error: request for member 'bigEndianValue'
> > > > > in something not a structure or union
> > > > >
> > > > > Below is a diff of a fix that remedies the problem. Testing may be
> > > > > required, as I'm not sure exactly what should be tested to ensure
> > > > > it does everything correctly. My poor test consisted of running
> > > > > exmidi and verifying that it properly plays a midi file.
> > >
> > > Ok, committed it, after discussion in #allegro.
> > >
> > > --
> > > Elias Pschernig
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email is sponsored by xPML, a groundbreaking scripting
> > > language that extends applications into web and mobile media. Attend
> > > the live webcast and join the prime developer group breaking into this
> > > new coding territory!
> > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=12164
> > >2 --
> > > https://lists.sourceforge.net/lists/listinfo/alleg-developers
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live
> webcast and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642

Works fine for me on x86, built with no issues. Need to get a PPC check now. 
Although don't change that to: 
#if TARGET_RT_BIG_ENDIAN
leave it as:
#ifndef TARGET_RT_BIG_ENDIAN

-- 
-juvinious

<a href="http://chasm.hopto.org";>The Chasm</a> - My Site.




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