[Tremor] Byte order problem

Johannes Sandvall js at sandvall.nu
Mon Sep 20 11:10:57 PDT 2004


On Mon 20 Sep 2004 17:53:02 CEST, Niklas Barsk wrote:
> Hi,
> I am running the lowmem branch of Tremor on a Sun Solaris workstation.
> There were some problems compiling the misc.h file, both endian
> versions of the union magic was compiled and caused a conflict. So I
> just commented out the little endian version since I am running on a
> big endian machine.
> 
> With this modification the code compiles but the output file just
> contains noise. I tried to run Tremor on another Linux computer and 
> that gives a good output. I have decoded the same Vorbis file on both 
> systems and compared them with a hex editor. The difference is that 
> the Sun decoded file has a somewhat different byte order than the Linux.
> When the Linux version has the order A B C D the Sun version has B A D C.
> 
> I have tried to comment out the big endian code instead, but the 
> generated file has no similarities, which I can spot, with the
> correct one if I do that.
> 
> Does anyone know why this happens and how I can solve it?
> 

That has maybe to do with endianess. Linux on PC is little endian and
Sun is big endian...

A B C D vs B A D C is endian difference. Just make sure that the
correct endian flag is declared under PC and Sun. If the flag is not
automatically set if your self. It's not that hard.

BR,

/Johannes Sandvall


More information about the Tremor mailing list