On Sun, Aug 11, 2002 at 09:38:42AM +1000, Erik de Castro Lopo wrote: > On Sat, 10 Aug 2002 18:32:36 -0500 > Mark Rages <[EMAIL PROTECTED]> wrote: > > > Ahh, I forgot CDDA is signed. > > > > Yes, I meant the u16 in the general sense that you picked up on. > > > > Well, you can try a byte-swap like this: > > > > #include <string.h> // for swab() > > #include <asm/byteorder.h> // for __LITTLE_ENDIAN macro > > In my last replay I suggested that you not use headers like <linux/*.h> > and in this one, I'm goint to suggest that you not use <asm/*.h> headers. > > You will also find __LITTLE_ENDIAN (and __BIG_ENDIAN) in <endian.h> which > is designed to be used in user space programs. > > Erik
Not only that, but I screwed up the test for endianness. Instead of #ifdef __LITTLE_ENDIAN it should be #if __BYTE_ORDER == __LITTLE_ENDIAN Regards, Mark
