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

From: <torbenh@email-addr-hidden>
Date: Tue Mar 14 2006 - 20:39:36 EET

On Tue, Mar 14, 2006 at 12:21:40AM +0100, fons adriaensen wrote:
> 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.

the current netjack code for converting the floats is tested.
it works. at least for PPC <-> intel

i only added the packet header after that test, and robert did not yet
test it again.

>
> 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 ?

i am happy, that i dont need to transfer doubles :)

-- 
torben Hohn
http://galan.sourceforge.net -- The graphical Audio language
Received on Wed Mar 15 00:15:05 2006

This archive was generated by hypermail 2.1.8 : Wed Mar 15 2006 - 00:15:05 EET