[linux-audio-user] Re: [linux-audio-dev] [ANN] netjack-0.9rc1

fons adriaensen fons.adriaensen at skynet.be
Mon Mar 13 23:21:40 UTC 2006


On Mon, Mar 13, 2006 at 11:59:15PM +0100, stefan kersten wrote:

> as paul stated, network byte order is defined to be
> big-endian, so yes, you have to convert 32 bit floats (and
> doubles, for that matter) on intel, because they are stored
> lsb first. of course it would be perfectly valid for netjack
> to use little endian `on the wire'; but this would be like
> putting my powerbook in little endian mode when playing a
> wav file. sort of.

OK, but for floats the situation could be more complex. On Intel,
the exponent/sign byte is the last one. Is it always the first
one on BE platforms ? If it isn't then using ntohl() or htonl()
wich are designed to work on 32-bit ints will not help. 

For doubles, things are even more fuzzy. Can you just use ntohl()
and htonl() on both halves, or do these two have to be swapped as
well ? Will either rule produce consistent results on all
platforms ?

-- 
FA

Follie ! Follie delirio vano e' questo !



More information about the Linux-audio-dev mailing list